Automatically zip the Chrome extension when releasing so I can upload it to the store.

This commit is contained in:
Nicolas Stepien 2013-03-20 18:58:18 +01:00
parent a76e6ea1f4
commit b88eeaa04d
2 changed files with 19 additions and 5 deletions

View File

@ -95,6 +95,18 @@ module.exports = function(grunt) {
tasks: 'default'
}
},
compress: {
crx: {
options: {
archive: 'builds/4chan-X.zip',
level: 9,
pretty: true
},
expand: true,
cwd: 'builds/crx/',
src: '**'
}
},
clean: {
tmp: 'tmp'
}
@ -103,6 +115,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
@ -117,7 +130,7 @@ module.exports = function(grunt) {
'concat:metadata',
'clean'
]);
grunt.registerTask('release', ['default', 'exec:commit', 'exec:push']);
grunt.registerTask('release', ['default', 'exec:commit', 'exec:push', 'compress:crx']);
grunt.registerTask('patch', ['bump', 'updcl:3']);
grunt.registerTask('minor', ['bump:minor', 'updcl:2']);
grunt.registerTask('major', ['bump:major', 'updcl:1']);

View File

@ -15,12 +15,13 @@
]
},
"devDependencies": {
"grunt": "~0.4.0",
"grunt": "~0.4.1",
"grunt-bump": "~0.0.0",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-coffee": "~0.6.2",
"grunt-contrib-concat": "~0.1.0",
"grunt-contrib-watch": "~0.3.0",
"grunt-contrib-coffee": "~0.6.3",
"grunt-contrib-compress": "~0.4.4",
"grunt-contrib-concat": "~0.1.3",
"grunt-contrib-watch": "~0.3.1",
"grunt-exec": "~0.4.0"
},
"repository": {