[MM-45409] Restrict auto-update functionality specifically to the NSIS installer and AppImage (#2177)
* [MM-45409] Restrict auto-update functionality specifically to the NSIS installer and AppImage * Fixes * Fix syntax error * Fixes #2 * Switch PR builds to ZIP * Fix
This commit is contained in:
parent
5b93e20ab8
commit
e674c5c28e
|
@ -261,7 +261,7 @@ jobs:
|
|||
- "~/.cache/electron"
|
||||
- "~/.cache/electron-builder"
|
||||
- save:
|
||||
filename: "$(jq -r .version package.json)/*.exe"
|
||||
filename: "$(jq -r .version package.json)/*.zip"
|
||||
|
||||
build-mac-pr:
|
||||
executor: mac
|
||||
|
|
|
@ -46,15 +46,18 @@
|
|||
"test:unit": "jest",
|
||||
"test:unit-ci": "jest --runInBand",
|
||||
"test:coverage": "jest --coverage",
|
||||
"package:all": "cross-env NODE_ENV=production npm-run-all check-build-config package:windows package:mac package:mac-universal package:linux",
|
||||
"package:windows": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --win --x64 --ia32 --publish=never",
|
||||
"package:all": "cross-env NODE_ENV=production npm-run-all check-build-config package:windows package:windows-nsis package:mac package:mac-universal package:linux",
|
||||
"package:windows": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --win zip --x64 --ia32 --publish=never",
|
||||
"package:windows-nsis": "cross-env NODE_ENV=production CAN_UPGRADE=true npm-run-all check-build-config build && electron-builder --win zip nsis --x64 --ia32 --publish=never",
|
||||
"package:mac": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --mac --x64 --arm64 --publish=never",
|
||||
"package:mac-with-universal": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --mac --x64 --arm64 --universal --publish=never",
|
||||
"package:mas": "cross-env NODE_ENV=production IS_MAC_APP_STORE=true npm-run-all check-build-config build && electron-builder --mac mas --universal --publish=never",
|
||||
"package:mas-dev": "cross-env NODE_ENV=production IS_MAC_APP_STORE=true npm-run-all check-build-config build && electron-builder --mac mas-dev --universal --publish=never",
|
||||
"package:linux": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux --x64 --publish=never",
|
||||
"package:linux": "npm-run-all package:linux-*",
|
||||
"package:linux-appImage": "cross-env NODE_ENV=production CAN_UPGRADE=true npm-run-all check-build-config build && electron-builder --linux tar.gz appimage --x64 --publish=never",
|
||||
"package:linux-deb": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux tar.gz deb --x64 --publish=never",
|
||||
"package:linux-rpm": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux tar.gz rpm --x64 --publish=never",
|
||||
"package:linux-targz": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux tar.gz --x64 --publish=never",
|
||||
"lint:js": "eslint --ignore-path .gitignore --ignore-pattern node_modules --ext .js --ext .jsx --ext .ts --ext .tsx .",
|
||||
"lint:js-quiet": "eslint --ignore-path .gitignore --ignore-pattern node_modules --ext .js --ext .jsx --ext .ts --ext .tsx . --quiet",
|
||||
"fix:js": "eslint --ignore-path .gitignore --ignore-pattern node_modules --quiet --ext .js --ext .jsx --ext .ts --ext .tsx . --fix",
|
||||
|
|
|
@ -531,6 +531,8 @@ function Run-BuildElectron {
|
|||
npm run build
|
||||
#npm run build --prefix="$(Get-RootDir)" "$(Get-RootDir)"
|
||||
Print-Info "Packaging nodejs/electron for Windows (running npm run package:windows)..."
|
||||
# NSIS has the upgrade flag enabled, so it must be done first
|
||||
npm run package:windows-nsis
|
||||
npm run package:windows
|
||||
#npm run package:windows --prefix="$(Get-RootDir)" "$(Get-RootDir)"
|
||||
}
|
||||
|
|
|
@ -12,7 +12,9 @@ if [ "$RELEASE_VERSION" == "" ]; then
|
|||
fi
|
||||
|
||||
echo "${RELEASE_VERSION}"
|
||||
for i in ./release/${RELEASE_VERSION}*.yml; do
|
||||
VERSION=$VERSION yq eval -i '.files[].url |= strenv(VERSION) + "/" + .' $i
|
||||
done
|
||||
if [[ -f ./release/${RELEASE_VERSION}*.yml ]]; then
|
||||
for i in ./release/${RELEASE_VERSION}*.yml; do
|
||||
VERSION=$VERSION yq eval -i '.files[].url |= strenv(VERSION) + "/" + .' $i
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ const isRelease = process.env.CIRCLE_BRANCH && process.env.CIRCLE_BRANCH.startsW
|
|||
|
||||
const codeDefinitions = {
|
||||
__HASH_VERSION__: !isRelease && JSON.stringify(VERSION),
|
||||
__CAN_UPGRADE__: JSON.stringify(true), // we should set this to false when working on a store version. Hardcoding for now.
|
||||
__CAN_UPGRADE__: JSON.stringify(process.env.CAN_UPGRADE === 'true'),
|
||||
__IS_NIGHTLY_BUILD__: JSON.stringify(process.env.CIRCLE_BRANCH === 'nightly'),
|
||||
__IS_MAC_APP_STORE__: JSON.stringify(process.env.IS_MAC_APP_STORE === 'true'),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue