File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8989 run : ./scripts/download-ffmpeg.sh darwin
9090
9191 - name : Sync version
92- run : |
93- chmod +x scripts/sync-version.sh
94- ./scripts/sync-version.sh
92+ run : bash scripts/sync-version.sh
9593
9694 - name : Prepare build directory
9795 run : |
@@ -146,9 +144,7 @@ jobs:
146144 shell : bash
147145
148146 - name : Sync version
149- run : |
150- chmod +x scripts/sync-version.sh
151- ./scripts/sync-version.sh
147+ run : bash scripts/sync-version.sh
152148 shell : bash
153149
154150 - name : Prepare build directory
Original file line number Diff line number Diff line change 9898 run : ./scripts/download-ffmpeg.sh darwin
9999
100100 - name : Sync version
101- run : |
102- chmod +x scripts/sync-version.sh
103- ./scripts/sync-version.sh
101+ run : bash scripts/sync-version.sh
104102
105103 - name : Prepare build directory
106104 run : |
@@ -154,9 +152,7 @@ jobs:
154152 shell : bash
155153
156154 - name : Sync version
157- run : |
158- chmod +x scripts/sync-version.sh
159- ./scripts/sync-version.sh
155+ run : bash scripts/sync-version.sh
160156 shell : bash
161157
162158 - name : Prepare build directory
Original file line number Diff line number Diff line change @@ -4,16 +4,23 @@ set -euo pipefail
44# Build Desktop Application for All Platforms
55# Usage: ./scripts/build-desktop-all.sh
66
7+ # Get script directory and project root
8+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
9+ PROJECT_ROOT=" $( cd " $SCRIPT_DIR /.." && pwd) "
10+
11+ # Change to project root
12+ cd " $PROJECT_ROOT "
13+
714echo " 📦 Syncing version from package.json..."
8- ./ scripts/sync-version.sh
15+ bash scripts/sync-version.sh
916
1017echo " 📋 Preparing build directory..."
1118mkdir -p build
1219cp images/icon.png build/appicon.png
1320
1421echo " 📦 Downloading FFmpeg for all platforms..."
15- ./ scripts/download-ffmpeg.sh darwin
16- ./ scripts/download-ffmpeg.sh windows
22+ bash scripts/download-ffmpeg.sh darwin
23+ bash scripts/download-ffmpeg.sh windows
1724
1825echo " 🎨 Building frontend..."
1926cd frontend && VITE_APP_VERSION=$( node -p " require('./package.json').version" ) npm run build && cd ..
Original file line number Diff line number Diff line change @@ -4,11 +4,18 @@ set -euo pipefail
44# Build Desktop Application
55# Usage: ./scripts/build-desktop.sh [debug|release] [platform]
66
7+ # Get script directory and project root
8+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
9+ PROJECT_ROOT=" $( cd " $SCRIPT_DIR /.." && pwd) "
10+
711BUILD_MODE=" ${1:- release} "
812PLATFORM=" ${2:- } "
913
14+ # Change to project root
15+ cd " $PROJECT_ROOT "
16+
1017echo " 📦 Syncing version from package.json..."
11- ./ scripts/sync-version.sh
18+ bash scripts/sync-version.sh
1219
1320echo " 📋 Preparing build directory..."
1421mkdir -p build
Original file line number Diff line number Diff line change 55SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
66PROJECT_ROOT=" $SCRIPT_DIR /.."
77
8- # Read version from package.json
9- VERSION=$( node -p " require('$PROJECT_ROOT /frontend/package.json').version" )
8+ # Change to project root to ensure relative paths work
9+ cd " $PROJECT_ROOT "
10+
11+ # Read version from package.json (using relative path from project root)
12+ VERSION=$( node -p " require('./frontend/package.json').version" )
1013
1114echo " 📦 Syncing version: $VERSION "
1215
13- # Update wails.json
16+ # Update wails.json (now using relative path from project root)
1417if command -v jq & > /dev/null; then
1518 # Use jq if available
16- jq --arg version " $VERSION " ' .info.productVersion = $version' " $PROJECT_ROOT / wails.json" > " $PROJECT_ROOT / wails.json.tmp"
17- mv " $PROJECT_ROOT / wails.json.tmp" " $PROJECT_ROOT / wails.json"
19+ jq --arg version " $VERSION " ' .info.productVersion = $version' wails.json > wails.json.tmp
20+ mv wails.json.tmp wails.json
1821 echo " ✓ Updated wails.json to version $VERSION "
1922else
2023 # Fallback to sed
21- sed -i.bak " s/\" productVersion\" : \" .*\" /\" productVersion\" : \" $VERSION \" /" " $PROJECT_ROOT / wails.json"
22- rm -f " $PROJECT_ROOT / wails.json.bak"
24+ sed -i.bak " s/\" productVersion\" : \" .*\" /\" productVersion\" : \" $VERSION \" /" wails.json
25+ rm -f wails.json.bak
2326 echo " ✓ Updated wails.json to version $VERSION (using sed)"
2427fi
2528
You can’t perform that action at this time.
0 commit comments