Commit bfd6ea59 by Rashid Khan

Switched to grunt-contrib-compress, added tar.gz archive

parent 9b74699d
...@@ -161,11 +161,42 @@ module.exports = function (grunt) { ...@@ -161,11 +161,42 @@ module.exports = function (grunt) {
// Target-specific file lists and/or options go here. // Target-specific file lists and/or options go here.
}, },
}, },
zip: { compress: {
dist: { zip: {
cwd: '<%= destDir %>', options: {
src: ['<%= destDir %>/**/*','LICENSE.md','README.md'], archive: '<%= tempDir %>/<%= pkg.name %>-latest.zip'
dest: '<%= tempDir %>/dist.zip' },
files : [
{
expand: true,
cwd: '<%= destDir %>',
src: ['**/*'],
dest: '<%= pkg.name %>-latest'
},
{
expand: true,
src: ['LICENSE.md','README.md'],
dest: '<%= pkg.name %>-latest'
}
]
},
tgz: {
options: {
archive: '<%= tempDir %>/<%= pkg.name %>-latest.tar.gz'
},
files : [
{
expand: true,
cwd: '<%= destDir %>',
src: ['**/*'],
dest: '<%= pkg.name %>-latest'
},
{
expand: true,
src: ['LICENSE.md','README.md'],
dest: '<%= pkg.name %>-latest'
}
]
} }
}, },
s3: { s3: {
...@@ -175,8 +206,12 @@ module.exports = function (grunt) { ...@@ -175,8 +206,12 @@ module.exports = function (grunt) {
// debug: true, // uncommment to prevent actual upload // debug: true, // uncommment to prevent actual upload
upload: [ upload: [
{ {
src: '<%= tempDir %>/dist.zip', src: '<%= tempDir %>/<%= pkg.name %>-latest.zip',
dest: 'kibana/kibana/<%= pkg.name %>-latest.zip', dest: 'kibana/kibana/<%= pkg.name %>-latest.zip',
},
{
src: '<%= tempDir %>/<%= pkg.name %>-latest.tar.gz',
dest: 'kibana/kibana/<%= pkg.name %>-latest.tar.gz',
} }
] ]
} }
...@@ -272,7 +307,8 @@ module.exports = function (grunt) { ...@@ -272,7 +307,8 @@ module.exports = function (grunt) {
grunt.registerTask('distribute', [ grunt.registerTask('distribute', [
'distribute:load_s3_config', 'distribute:load_s3_config',
'build', 'build',
'zip:dist', 'compress:zip',
'compress:tgz',
's3:dist', 's3:dist',
'clean:temp' 'clean:temp'
]); ]);
...@@ -288,7 +324,6 @@ module.exports = function (grunt) { ...@@ -288,7 +324,6 @@ module.exports = function (grunt) {
// load plugins // load plugins
grunt.loadNpmTasks('grunt-s3'); grunt.loadNpmTasks('grunt-s3');
grunt.loadNpmTasks('grunt-zip');
grunt.loadNpmTasks('grunt-ngmin'); grunt.loadNpmTasks('grunt-ngmin');
grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-less');
...@@ -300,6 +335,8 @@ module.exports = function (grunt) { ...@@ -300,6 +335,8 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-string-replace'); grunt.loadNpmTasks('grunt-string-replace');
grunt.loadNpmTasks('grunt-contrib-htmlmin'); grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-contrib-requirejs'); grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-compress');
// pass the config to grunt // pass the config to grunt
grunt.initConfig(config); grunt.initConfig(config);
......
...@@ -7,10 +7,8 @@ ...@@ -7,10 +7,8 @@
"version": "3.0.0m3pre", "version": "3.0.0m3pre",
"devDependencies": { "devDependencies": {
"rjs-build-analysis": "0.0.3", "rjs-build-analysis": "0.0.3",
"grunt": "~0.4.0", "grunt": "~0.4.0",
"grunt-s3": "~0.2.0-alpha.2", "grunt-s3": "~0.2.0-alpha.2",
"grunt-zip": "~0.9.2",
"grunt-ngmin": "0.0.3", "grunt-ngmin": "0.0.3",
"grunt-contrib": "~0.7.0", "grunt-contrib": "~0.7.0",
"grunt-contrib-less": "~0.7.0", "grunt-contrib-less": "~0.7.0",
...@@ -23,7 +21,8 @@ ...@@ -23,7 +21,8 @@
"grunt-string-replace": "~0.2.4", "grunt-string-replace": "~0.2.4",
"grunt-contrib-htmlmin": "~0.1.3", "grunt-contrib-htmlmin": "~0.1.3",
"grunt-contrib-requirejs": "~0.4.1", "grunt-contrib-requirejs": "~0.4.1",
"grunt-angular-templates": "~0.3.12" "grunt-angular-templates": "~0.3.12",
"grunt-contrib-compress": "~0.5.2"
}, },
"license": "Apache License" "license": "Apache License"
} }
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