Use grunt-shell instead of grunt-exec.
This commit is contained in:
parent
7575b72b95
commit
46549862a2
32
Gruntfile.js
32
Gruntfile.js
@ -6,6 +6,11 @@ module.exports = function(grunt) {
|
|||||||
data: pkg
|
data: pkg
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var shellOptions = {
|
||||||
|
stdout: true,
|
||||||
|
stderr: true,
|
||||||
|
failOnError: true
|
||||||
|
};
|
||||||
|
|
||||||
// Project configuration.
|
// Project configuration.
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
@ -75,22 +80,19 @@ module.exports = function(grunt) {
|
|||||||
concurrent: {
|
concurrent: {
|
||||||
build: ['build-crx', 'build-userjs', 'build-userscript']
|
build: ['build-crx', 'build-userjs', 'build-userscript']
|
||||||
},
|
},
|
||||||
exec: {
|
shell: {
|
||||||
commit: {
|
commit: {
|
||||||
command: function() {
|
options: shellOptions,
|
||||||
var release = pkg.meta.name + ' v' + pkg.version;
|
command: [
|
||||||
return [
|
'git checkout <%= pkg.meta.mainBranch %>',
|
||||||
'git checkout ' + pkg.meta.mainBranch,
|
'git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."',
|
||||||
'git commit -am "Release ' + release + '."',
|
'git tag -a <%= pkg.version %> -m "<%= pkg.meta.name %> v<%= pkg.version %>."',
|
||||||
'git tag -a ' + pkg.version + ' -m "' + release + '."',
|
'git tag -af stable-v3 -m "<%= pkg.meta.name %> v<%= pkg.version %>."'
|
||||||
'git tag -af stable-v3 -m "' + release + '."'
|
].join(' && ')
|
||||||
].join(' && ');
|
|
||||||
},
|
|
||||||
stdout: true
|
|
||||||
},
|
},
|
||||||
push: {
|
push: {
|
||||||
command: 'git push origin --tags -f && git push origin --all',
|
options: shellOptions,
|
||||||
stdout: true
|
command: 'git push origin --tags -f && git push origin --all'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -139,7 +141,7 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
grunt.loadNpmTasks('grunt-exec');
|
grunt.loadNpmTasks('grunt-shell');
|
||||||
|
|
||||||
grunt.registerTask('default', ['build']);
|
grunt.registerTask('default', ['build']);
|
||||||
|
|
||||||
@ -171,7 +173,7 @@ module.exports = function(grunt) {
|
|||||||
'clean:tmpuserscript'
|
'clean:tmpuserscript'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
grunt.registerTask('release', ['exec:commit', 'exec:push', 'build-crx', 'compress:crx']);
|
grunt.registerTask('release', ['shell:commit', 'shell:push', 'build-crx', 'compress:crx']);
|
||||||
grunt.registerTask('patch', ['bump', 'reloadPkg', 'updcl:3', 'release']);
|
grunt.registerTask('patch', ['bump', 'reloadPkg', 'updcl:3', 'release']);
|
||||||
grunt.registerTask('minor', ['bump:minor', 'reloadPkg', 'updcl:2', 'release']);
|
grunt.registerTask('minor', ['bump:minor', 'reloadPkg', 'updcl:2', 'release']);
|
||||||
grunt.registerTask('major', ['bump:major', 'reloadPkg', 'updcl:1', 'release']);
|
grunt.registerTask('major', ['bump:major', 'reloadPkg', 'updcl:1', 'release']);
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
"grunt-contrib-concat": "~0.2.0",
|
"grunt-contrib-concat": "~0.2.0",
|
||||||
"grunt-contrib-copy": "~0.4.1",
|
"grunt-contrib-copy": "~0.4.1",
|
||||||
"grunt-contrib-watch": "~0.3.1",
|
"grunt-contrib-watch": "~0.3.1",
|
||||||
"grunt-exec": "~0.4.0"
|
"grunt-shell": "~0.2.2"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user