Commit 18ee2fab by Rashid Khan

added release task to gruntfile

parent 928332b6
......@@ -189,6 +189,42 @@ module.exports = function (grunt) {
dest: '<%= pkg.name %>-latest'
}
]
},
zip_release: {
options: {
archive: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.zip'
},
files : [
{
expand: true,
cwd: '<%= destDir %>',
src: ['**/*'],
dest: '<%= pkg.name %>-<%= pkg.version %>'
},
{
expand: true,
src: ['LICENSE.md', 'README.md'],
dest: '<%= pkg.name %>-<%= pkg.version %>'
}
]
},
tgz_release: {
options: {
archive: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.tar.gz'
},
files : [
{
expand: true,
cwd: '<%= destDir %>',
src: ['**/*'],
dest: '<%= pkg.name %>-<%= pkg.version %>'
},
{
expand: true,
src: ['LICENSE.md', 'README.md'],
dest: '<%= pkg.name %>-<%= pkg.version %>'
}
]
}
},
s3: {
......@@ -206,6 +242,21 @@ module.exports = function (grunt) {
dest: 'kibana/kibana/<%= pkg.name %>-latest.tar.gz',
}
]
},
release: {
bucket: 'download.elasticsearch.org',
access: 'private',
// debug: true, // uncommment to prevent actual upload
upload: [
{
src: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.zip',
dest: 'kibana/kibana/<%= pkg.name %>-<%= pkg.version %>.zip',
},
{
src: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.tar.gz',
dest: 'kibana/kibana/<%= pkg.name %>-<%= pkg.version %>.tar.gz',
}
]
}
}
};
......@@ -306,6 +357,16 @@ module.exports = function (grunt) {
'clean:temp'
]);
// build, then zip and upload to s3
grunt.registerTask('release', [
'distribute:load_s3_config',
'build',
'compress:zip_release',
'compress:tgz_release',
's3:release',
'clean:temp'
]);
// collect the key and secret from the .aws-config.json file, finish configuring the s3 task
grunt.registerTask('distribute:load_s3_config', function () {
var config = grunt.file.readJSON('.aws-config.json');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment