Skip to content

Commit bc90d71

Browse files
authored
Add the UI version fix (#8657)
* Add the UI version fix to the mac builds * Ensure jq is installed * Add version fix for windows * Use the system package manages for jq * Fix jq on deb
1 parent 6bbc9c3 commit bc90d71

File tree

5 files changed

+32
-1
lines changed

5 files changed

+32
-1
lines changed

.github/workflows/build-linux-arm64-installer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
curl git dialog apt-utils zlib1g-dev && \
7272
add-apt-repository ppa:deadsnakes/ppa -y && \
7373
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
74-
apt -y install nodejs fakeroot \
74+
apt -y install nodejs fakeroot jq \
7575
python3.8 python3.8-venv libpython3.8-dev python3.8-distutils && \
7676
rm -rf venv && \
7777
python3 --version && \

.github/workflows/build-linux-installer-deb.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ jobs:
103103
with:
104104
node-version: '12.x'
105105

106+
- name: Add jq
107+
run: |
108+
sudo apt-get install -y jq
109+
106110
- name: Build .deb package
107111
run: |
108112
. ./activate

build_scripts/build_macos.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,19 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
4444
exit $LAST_EXIT_CODE
4545
fi
4646

47+
# sets the version for chia-blockchain in package.json
48+
brew install jq
49+
cp package.json package.json.orig
50+
jq --arg VER "$CHIA_INSTALLER_VERSION" '.version=$VER' package.json > temp.json && mv temp.json package.json
51+
4752
electron-packager . Chia --asar.unpack="**/daemon/**" --platform=darwin \
4853
--icon=src/assets/img/Chia.icns --overwrite --app-bundle-id=net.chia.blockchain \
4954
--appVersion=$CHIA_INSTALLER_VERSION
5055
LAST_EXIT_CODE=$?
56+
57+
# reset the package.json to the original
58+
mv package.json.orig package.json
59+
5160
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
5261
echo >&2 "electron-packager failed!"
5362
exit $LAST_EXIT_CODE

build_scripts/build_macos_m1.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,19 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
4949
exit $LAST_EXIT_CODE
5050
fi
5151

52+
# sets the version for chia-blockchain in package.json
53+
brew install jq
54+
cp package.json package.json.orig
55+
jq --arg VER "$CHIA_INSTALLER_VERSION" '.version=$VER' package.json > temp.json && mv temp.json package.json
56+
5257
electron-packager . Chia --asar.unpack="**/daemon/**" --platform=darwin \
5358
--icon=src/assets/img/Chia.icns --overwrite --app-bundle-id=net.chia.blockchain \
5459
--appVersion=$CHIA_INSTALLER_VERSION
5560
LAST_EXIT_CODE=$?
61+
62+
# reset the package.json to the original
63+
mv package.json.orig package.json
64+
5665
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
5766
echo >&2 "electron-packager failed!"
5867
exit $LAST_EXIT_CODE

build_scripts/build_windows.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,15 @@ $packageName = "Chia-$packageVersion"
107107

108108
Write-Output "packageName is $packageName"
109109

110+
Write-Output " ---"
111+
Write-Output "fix version in package.json"
112+
choco install jq
113+
cp package.json package.json.orig
114+
jq --arg VER "$env:CHIA_INSTALLER_VERSION" '.version=$VER' package.json > temp.json
115+
rm package.json
116+
mv temp.json package.json
117+
Write-Output " ---"
118+
110119
Write-Output " ---"
111120
Write-Output "electron-packager"
112121
electron-packager . Chia --asar.unpack="**\daemon\**" --overwrite --icon=.\src\assets\img\chia.ico --app-version=$packageVersion

0 commit comments

Comments
 (0)