Release task now always publishes to staging

Production builds should never be published directly from a local
machine. Instead, the release command will now publish to a
commit-specific staging URL, so you use it to publish a release
candidate, and then when those builds have been verified, you need to
copy the RC builds from on the staging location on s3 to the production
folder.
This commit is contained in:
Court Ewing 2016-06-17 14:26:08 -04:00
parent b727ccbb70
commit 1e2c953f16
2 changed files with 9 additions and 4 deletions

View file

@ -48,6 +48,7 @@
"test:server": "grunt test:server",
"test:coverage": "grunt test:coverage",
"build": "grunt build",
"release": "grunt release",
"start": "sh ./bin/kibana --dev",
"precommit": "grunt precommit",
"karma": "karma start",

View file

@ -38,6 +38,8 @@ module.exports = function (grunt) {
});
grunt.registerTask('_release:setS3Uploads', function () {
const { sha, version } = grunt.config.get('build');
var uploads = grunt.config.get('platforms')
.reduce(function (files, platform) {
return files.concat(
@ -61,10 +63,12 @@ module.exports = function (grunt) {
}
})
.map(function (filename) {
return {
src: 'target/' + filename,
dest: 'kibana/kibana/' + filename
};
const src = `target/${filename}`;
const shortSha = sha.substr(0, 7);
const dest = `kibana/staging/${version}-${shortSha}/kibana/${filename}`;
return { src, dest };
});
grunt.config.set('s3.release.upload', uploads);
});