File tree Expand file tree Collapse file tree 5 files changed +32
-1
lines changed
Expand file tree Collapse file tree 5 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 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 && \
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -44,10 +44,19 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
4444 exit $LAST_EXIT_CODE
4545fi
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+
4752electron-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
5055LAST_EXIT_CODE=$?
56+
57+ # reset the package.json to the original
58+ mv package.json.orig package.json
59+
5160if [ " $LAST_EXIT_CODE " -ne 0 ]; then
5261 echo >&2 " electron-packager failed!"
5362 exit $LAST_EXIT_CODE
Original file line number Diff line number Diff line change @@ -49,10 +49,19 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
4949 exit $LAST_EXIT_CODE
5050fi
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+
5257electron-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
5560LAST_EXIT_CODE=$?
61+
62+ # reset the package.json to the original
63+ mv package.json.orig package.json
64+
5665if [ " $LAST_EXIT_CODE " -ne 0 ]; then
5766 echo >&2 " electron-packager failed!"
5867 exit $LAST_EXIT_CODE
Original file line number Diff line number Diff line change @@ -107,6 +107,15 @@ $packageName = "Chia-$packageVersion"
107107
108108Write-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+
110119Write-Output " ---"
111120Write-Output " electron-packager"
112121electron- packager . Chia -- asar.unpack= " **\daemon\**" -- overwrite -- icon= .\src\assets\img\chia.ico -- app- version= $packageVersion
You can’t perform that action at this time.
0 commit comments