Skip to content

Commit

Permalink
Merge pull request #405 from jimmyhchan/testRelease
Browse files Browse the repository at this point in the history
Fix Grunt release and don't push upstream by default (safer)
  • Loading branch information
kate2753 committed Jan 16, 2014
2 parents 3ef4816 + 0073fc2 commit 3fea7ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ module.exports = function(grunt) {
options: {
stdout: true
}
},
gitAddArchive: {
command: 'git add <%= compress.distTarBall.options.archive %> <%= compress.distZip.options.archive %>',
options: {
stdout: true
}
}
},
concat: {
Expand Down Expand Up @@ -162,7 +168,9 @@ module.exports = function(grunt) {
bump: {
options: {
files: ['package.json', 'bower.json'],
updateConfigs: ['pkg']
updateConfigs: ['pkg'],
push: false,
commitFiles: ['-a']
}
},
log: {
Expand All @@ -186,6 +194,7 @@ module.exports = function(grunt) {
message: ['OK. Done bumping, adding, committing, tagging and pushing the new version',
'',
'You still need to manually do the following:',
' * git push upstream && git push upstream --tags',
' * npm publish'].join('\n')
}
}
Expand Down Expand Up @@ -249,8 +258,8 @@ module.exports = function(grunt) {

grunt.registerTask('copyForRelease', ['clean:dist', 'copy:core', 'copy:coreMin', 'copy:full', 'copy:fullMin', 'copy:license', 'log:copyForRelease']);
grunt.registerTask('buildRelease', ['test', 'copyForRelease', 'compress']);
grunt.registerTask('releasePatch', ['bump-only:patch', 'buildRelease', 'bump-commit', 'log:release']);
grunt.registerTask('releaseMinor', ['bump-only:minor', 'buildRelease', 'bump-commit', 'log:release']);
grunt.registerTask('releasePatch', ['bump-only:patch', 'buildRelease', 'shell:gitAddArchive', 'bump-commit', 'log:release']);
grunt.registerTask('releaseMinor', ['bump-only:minor', 'buildRelease', 'shell:gitAddArchive', 'bump-commit', 'log:release']);
// major release should probably be done with care
// grunt.registerTask('releaseMajor', ['bump-only:major', 'buildRelease', 'bump-commit:major', 'log:release']);

Expand Down
1 change: 1 addition & 0 deletions archive/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
previous build will place here.

0 comments on commit 3fea7ff

Please sign in to comment.