Build updates: remove unused commands and assets (#2318)

Build updates: remove unused commands and assets
This commit is contained in:
Scott Nonnenberg 2018-05-01 16:04:52 -07:00 committed by GitHub
commit 47468ee3db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 178 deletions

View file

@ -18,12 +18,6 @@ script:
env:
global:
- SIGNAL_ENV: production
- secure: LeXDynRSyeHXR9KdmhYuP/zsc8uFsnYoOWI3fqg8x5SLOilfDyQ766idkT9NTRrdSR8WY7wP4DPs3hrBWGmcVq7BhytI9Q34YSgGS/Sds0jlm5AzSpYfAHpSQ+9ufQXNKN6lgxTkupdsWlc2Em20wUd5EfluDSOoeWVMlqHmKrw=
- secure: WzXjaiy6BmEyKI3uXeanjbAlmzadlwIWxJbC7Mff2duIl/nsaOTK6ElYu23IfeBCvK1DxXV8DVUfTIZXkeFeqHKPtgq2t3HcS12YiNnb7ToGpgOpzElYY4wAOPxRbqPE/ZcthbSxo1x/thgDeWNWxqK1X4XJ3qEIRoE+tPsGKG8=
sudo: false
notifications:
email: false
addons:
artifacts:
paths:
- $(ls ./dist/*.* | tr "\n" ":")

View file

@ -308,79 +308,6 @@ module.exports = function(grunt) {
require('mkdirp').sync('release');
});
grunt.registerTask('fetch-release', function() {
grunt.task.requires('gitinfo');
require('mkdirp').sync('release');
var fs = require('fs');
var done = this.async();
var gitinfo = grunt.config.get('gitinfo');
var https = require('https');
var urlBase = 'https://s3-us-west-1.amazonaws.com/signal-desktop-builds';
var keyBase = 'signalapp/Signal-Desktop';
var sha = gitinfo.local.branch.current.SHA;
var files = [
{
zip: packageJson.name + '-' + packageJson.version + '.zip',
extractedTo: 'linux',
},
];
var extract = require('extract-zip');
var download = function(url, dest, extractedTo, cb) {
var file = fs.createWriteStream(dest);
var request = https
.get(url, function(response) {
if (response.statusCode !== 200) {
cb(response.statusCode);
} else {
response.pipe(file);
file.on('finish', function() {
file.close(function() {
extract(
dest,
{ dir: path.join(__dirname, 'release', extractedTo) },
cb
);
});
});
}
})
.on('error', function(err) {
// Handle errors
fs.unlink(dest); // Delete the file async. (But we don't check the result)
if (cb) cb(err.message);
});
};
Promise.all(
files.map(function(item) {
var key = [keyBase, sha, 'dist', item.zip].join('/');
var url = [urlBase, key].join('/');
var dest = 'release/' + item.zip;
return new Promise(function(resolve) {
console.log(url);
download(url, dest, item.extractedTo, function(err) {
if (err) {
console.log('failed', dest, err);
resolve(err);
} else {
console.log('done', dest);
resolve();
}
});
});
})
).then(function(results) {
results.forEach(function(error) {
if (error) {
grunt.fail.warn('Failed to fetch some release artifacts');
}
});
done();
});
});
function runTests(environment, cb) {
var failure;
var Application = require('spectron').Application;
@ -571,11 +498,6 @@ module.exports = function(grunt) {
grunt.registerTask('test', ['unit-tests', 'lib-unit-tests']);
grunt.registerTask('copy_dist', ['gitinfo', 'copy:res', 'copy:src']);
grunt.registerTask('date', ['gitinfo', 'getExpireTime']);
grunt.registerTask('prep-release', [
'gitinfo',
'clean-release',
'fetch-release',
]);
grunt.registerTask('default', [
'concat',
'copy:deps',

View file

@ -13,27 +13,14 @@
"scripts": {
"postinstall": "electron-builder install-app-deps && rimraf node_modules/dtrace-provider",
"start": "electron .",
"asarl": "asar l release/mac/Signal.app/Contents/Resources/app.asar",
"grunt": "grunt",
"icon-gen": "electron-icon-maker --input=images/icon_1024.png --output=./build",
"generate": "npm run icon-gen && grunt",
"build": "build --config.extraMetadata.environment=$SIGNAL_ENV",
"dist": "npm run generate && npm run build",
"pack": "npm run generate && npm run build -- --dir",
"build-release": "SIGNAL_ENV=production npm run build -- --config.directories.output=release",
"prepare-beta-build": "node prepare_beta_build.js",
"prepare-import-build": "node prepare_import_build.js",
"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",
"grunt": "grunt",
"prep-mac-release": "npm run build-release -- -m --dir",
"prep-release": "npm run generate && grunt prep-release && npm run build-release && npm run build-mas-release && grunt test-release",
"release-mac": "npm run build-release -- -m --prepackaged release/mac/Signal*.app --publish=always",
"release-win": "npm run build-release -- -w --prepackaged release/windows --publish=always",
"release-lin": "npm run build-release -- -l --prepackaged release/linux && NAME=$npm_package_name VERSION=$npm_package_version ./aptly.sh",
"release": "npm run release-mac && npm run release-win && npm run release-lin",
"publish-to-apt": "NAME=$npm_package_name VERSION=$npm_package_version ./aptly.sh",
"test": "yarn test-node && yarn test-electron",
"test-electron": "yarn grunt test",
"test-node": "mocha --recursive test/app test/modules ts/test",
@ -112,7 +99,6 @@
"electron": "1.8.4",
"electron-builder": "^20.2.0",
"electron-icon-maker": "0.0.3",
"electron-publisher-s3": "^20.2.0",
"eslint": "^4.14.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-prettier": "^2.9.0",
@ -162,17 +148,9 @@
{
"provider": "generic",
"url": "https://updates.signal.org/desktop"
},
{
"provider": "s3",
"region": "us-east-1",
"bucket": "updates.signal.org",
"path": "desktop",
"acl": "public-read"
}
],
"target": [
"dmg",
"zip"
],
"bundleVersion": "1"
@ -187,18 +165,10 @@
{
"provider": "generic",
"url": "https://updates.signal.org/desktop"
},
{
"provider": "s3",
"region": "us-east-1",
"bucket": "updates.signal.org",
"path": "desktop",
"acl": "public-read"
}
],
"target": [
"nsis",
"zip"
"nsis"
]
},
"nsis": {
@ -211,8 +181,7 @@
},
"asarUnpack": "node_modules/spellchecker/vendor/hunspell_dictionaries",
"target": [
"deb",
"zip"
"deb"
],
"icon": "build/icons/png"
},

View file

@ -566,20 +566,6 @@ autoprefixer@^6.3.1:
postcss "^5.2.16"
postcss-value-parser "^3.2.3"
aws-sdk@^2.202.0:
version "2.205.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.205.0.tgz#1a93730253e2be027a4bd3af9248cbda0573de80"
dependencies:
buffer "4.9.1"
events "^1.1.1"
jmespath "0.15.0"
querystring "0.2.0"
sax "1.2.1"
url "0.10.3"
uuid "3.1.0"
xml2js "0.4.17"
xmlbuilder "4.2.1"
aws-sign2@~0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
@ -995,14 +981,6 @@ buffer-xor@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
buffer@4.9.1, buffer@^4.3.0:
version "4.9.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298"
dependencies:
base64-js "^1.0.2"
ieee754 "^1.1.4"
isarray "^1.0.0"
buffer@^3.0.1:
version "3.6.0"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-3.6.0.tgz#a72c936f77b96bf52f5f7e7b467180628551defb"
@ -1011,6 +989,14 @@ buffer@^3.0.1:
ieee754 "^1.1.4"
isarray "^1.0.0"
buffer@^4.3.0:
version "4.9.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298"
dependencies:
base64-js "^1.0.2"
ieee754 "^1.1.4"
isarray "^1.0.0"
buffers@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb"
@ -2566,7 +2552,7 @@ electron-osx-sign@0.4.8:
minimist "^1.2.0"
plist "^2.1.0"
electron-publish@20.2.0, electron-publish@~20.2.0:
electron-publish@20.2.0:
version "20.2.0"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-20.2.0.tgz#1812738c4a4e14a8e156a9a083424a6e4e8e8264"
dependencies:
@ -2578,17 +2564,6 @@ electron-publish@20.2.0, electron-publish@~20.2.0:
lazy-val "^1.0.3"
mime "^2.2.0"
electron-publisher-s3@^20.2.0:
version "20.2.0"
resolved "https://registry.yarnpkg.com/electron-publisher-s3/-/electron-publisher-s3-20.2.0.tgz#6c2963adb1f33bdd0f4ce273988e2f74fc5c53b7"
dependencies:
aws-sdk "^2.202.0"
bluebird-lst "^1.0.5"
builder-util "^5.6.0"
electron-publish "~20.2.0"
fs-extra-p "^4.5.2"
mime "^2.2.0"
electron-to-chromium@^1.2.7:
version "1.3.41"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.41.tgz#7e33643e00cd85edfd17e04194f6d00e73737235"
@ -2947,7 +2922,7 @@ eventemitter3@1.x.x:
version "1.2.0"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508"
events@^1.0.0, events@^1.1.1:
events@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
@ -4857,10 +4832,6 @@ jimp@^0.2.27:
tinycolor2 "^1.1.2"
url-regex "^3.0.0"
jmespath@0.15.0:
version "0.15.0"
resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217"
jodid25519@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"
@ -7855,7 +7826,7 @@ sass-graph@^2.1.1:
scss-tokenizer "^0.2.1"
yargs "^6.6.0"
sax@1.2.1, sax@>=0.6.0:
sax@>=0.6.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a"
@ -9220,13 +9191,6 @@ url-to-options@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"
url@0.10.3:
version "0.10.3"
resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64"
dependencies:
punycode "1.3.2"
querystring "0.2.0"
url@^0.11.0, url@~0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
@ -9269,10 +9233,6 @@ utils-merge@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
uuid@3.1.0, uuid@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"
uuid@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
@ -9285,6 +9245,10 @@ uuid@^3.0.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14"
uuid@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"
validate-npm-package-license@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
@ -9660,19 +9624,13 @@ xml-parse-from-string@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/xml-parse-from-string/-/xml-parse-from-string-1.0.0.tgz#feba5809f3cd2d17d2e4239fa810cd0319fc5da5"
xml2js@0.4.17, xml2js@^0.4.5:
xml2js@^0.4.5:
version "0.4.17"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868"
dependencies:
sax ">=0.6.0"
xmlbuilder "^4.1.0"
xmlbuilder@4.2.1, xmlbuilder@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5"
dependencies:
lodash "^4.0.0"
xmlbuilder@8.2.2:
version "8.2.2"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-8.2.2.tgz#69248673410b4ba42e1a6136551d2922335aa773"
@ -9683,6 +9641,12 @@ xmlbuilder@^3.1.0:
dependencies:
lodash "^3.5.0"
xmlbuilder@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5"
dependencies:
lodash "^4.0.0"
xmldom@0.1.x:
version "0.1.27"
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9"