Skip to content

Commit

Permalink
chore(release): push to correct branch (master/stable)
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Mar 29, 2013
1 parent 4b9533b commit bfd76b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasks/bump.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ module.exports = function(grunt) {
// increment the version
var pkg = grunt.file.readJSON(grunt.config('pkgFile'));
var previousVersion = pkg.version;
var minor = parseInt(previousVersion.split('.')[1], 10);
var branch = (minor % 2) ? 'master' : 'stable';
var newVersion = pkg.version = bumpVersion(previousVersion, type);

// write updated package.json
Expand All @@ -67,7 +69,7 @@ module.exports = function(grunt) {
'Changes committed');
run('git tag -a v' + newVersion + ' -m "Version ' + newVersion + '"', 'New tag "v' +
newVersion + '" created');
run('git push upstream master --tags', 'Pushed to github');
run('git push upstream ' + branch + ' --tags', 'Pushed to github');
});


Expand Down

0 comments on commit bfd76b9

Please sign in to comment.