More release scripting in npm
npm run icon-gen and grunt (run default task) can be grouped into one operation. Use SIGNAL_ENV instead of NODE_ENV since Setting NODE_ENV adversely affects yarn's install behavior, so we had to set it after the install and before the build. By using a custom variable instead, we can set it globally and eventually use it in a build matrix. Move mas build to its own npm script // FREEBIE
This commit is contained in:
parent
9fe6bce0cc
commit
08b7ce88d9
3 changed files with 24 additions and 15 deletions
|
@ -8,11 +8,11 @@ dist: trusty
|
|||
install:
|
||||
- yarn install
|
||||
script:
|
||||
- export NODE_ENV=production
|
||||
- yarn test
|
||||
- yarn ci-build
|
||||
env:
|
||||
global:
|
||||
- SIGNAL_ENV: production
|
||||
- secure: LeXDynRSyeHXR9KdmhYuP/zsc8uFsnYoOWI3fqg8x5SLOilfDyQ766idkT9NTRrdSR8WY7wP4DPs3hrBWGmcVq7BhytI9Q34YSgGS/Sds0jlm5AzSpYfAHpSQ+9ufQXNKN6lgxTkupdsWlc2Em20wUd5EfluDSOoeWVMlqHmKrw=
|
||||
- secure: WzXjaiy6BmEyKI3uXeanjbAlmzadlwIWxJbC7Mff2duIl/nsaOTK6ElYu23IfeBCvK1DxXV8DVUfTIZXkeFeqHKPtgq2t3HcS12YiNnb7ToGpgOpzElYY4wAOPxRbqPE/ZcthbSxo1x/thgDeWNWxqK1X4XJ3qEIRoE+tPsGKG8=
|
||||
sudo: false
|
||||
|
|
|
@ -14,12 +14,14 @@ test_script:
|
|||
- yarn test
|
||||
|
||||
build_script:
|
||||
- set NODE_ENV=production
|
||||
- yarn ci-build
|
||||
|
||||
artifacts:
|
||||
- path: dist/*.zip
|
||||
|
||||
environment:
|
||||
SIGNAL_ENV: production
|
||||
|
||||
deploy:
|
||||
provider: Environment
|
||||
name: signal-desktop-builds
|
||||
|
|
33
package.json
33
package.json
|
@ -35,17 +35,25 @@
|
|||
"test": "grunt test",
|
||||
"lint": "grunt jshint",
|
||||
"start": "electron .",
|
||||
"ci-build": "npm run icon-gen && grunt && build --em.environment=$NODE_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER' --config.mac.target=zip --config.win.target=zip --config.linux.target=zip --publish=never",
|
||||
"dist": "npm run icon-gen && grunt && build --em.environment=$NODE_ENV",
|
||||
"pack": "npm run dist -- --dir",
|
||||
"pack-staging": "NODE_ENV=staging npm run pack",
|
||||
"dist-staging": "NODE_ENV=staging npm run dist",
|
||||
"pack-prod": "NODE_ENV=production npm run pack",
|
||||
"dist-prod": "NODE_ENV=production npm run dist",
|
||||
"dist-prod-all": "NODE_ENV=production npm run dist -- -mwl",
|
||||
"release": "npm run icon-gen && grunt && NODE_ENV=production build --em.environment=production -mwl",
|
||||
"asarl": "asar l release/mac/Signal.app/Contents/Resources/app.asar",
|
||||
"icon-gen": "electron-icon-maker --input=images/icon_1024.png --output=./build",
|
||||
"asarl": "asar l dist/mas/Signal.app/Contents/Resources/app.asar"
|
||||
"generate": "npm run icon-gen && grunt",
|
||||
"build": "build --em.environment=$SIGNAL_ENV",
|
||||
"ci-build": "npm run generate && npm run build -- --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER' --config.mac.target=zip --config.win.target=zip --config.linux.target=zip --publish=never",
|
||||
"dist": "npm run generate && npm run build",
|
||||
"pack": "npm run dist -- --dir",
|
||||
"pack-prod": "SIGNAL_ENV=production npm run pack",
|
||||
"dist-prod": "SIGNAL_ENV=production npm run dist",
|
||||
"dist-prod-all": "SIGNAL_ENV=production npm run dist -- -mwl",
|
||||
"build-release": "SIGNAL_ENV=production npm run build -- --config.directories.output=release",
|
||||
"build-mas-release": "npm run build-release -- -m --config.mac.target=mas",
|
||||
"build-mas-dev" : "npm run build-release -- -m --config.mac.target=mas --config.type=development",
|
||||
"prep-mac-release": "npm run build-release -- -m --dir",
|
||||
"prep-release": "grunt clean-release && npm run generate && npm run prep-mac-release && npm run build-mas-release && grunt prep-release",
|
||||
"release-mac": "npm run build-release -- -m --prepackaged release/mac/Signal.app --publish=always",
|
||||
"release-win": "npm run build-release -- -w --prepackaged release/win-unpacked --publish=always",
|
||||
"release-lin": "npm run build-release -- -l --prepackaged release/linux-unpacked && VERSION=$npm_package_version ./aptly.sh",
|
||||
"release": "npm run release-mac && npm run release-win && npm run release-lin"
|
||||
},
|
||||
"build": {
|
||||
"appId": "org.whispersystems.signal-desktop",
|
||||
|
@ -60,7 +68,6 @@
|
|||
"acl": "public-read"
|
||||
},
|
||||
"target": [
|
||||
"mas",
|
||||
"dmg",
|
||||
"zip"
|
||||
],
|
||||
|
@ -87,8 +94,8 @@
|
|||
"files": [
|
||||
"package.json",
|
||||
"config/default.json",
|
||||
"config/${env.NODE_ENV}.json",
|
||||
"config/local-${env.NODE_ENV}.json",
|
||||
"config/${env.SIGNAL_ENV}.json",
|
||||
"config/local-${env.SIGNAL_ENV}.json",
|
||||
"background.html",
|
||||
"_locales/**",
|
||||
"protos/*",
|
||||
|
|
Loading…
Reference in a new issue