From bfd76b99d6e7c1cbe85c61036c6df16ba63c0755 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Fri, 29 Mar 2013 16:40:00 -0700 Subject: [PATCH] chore(release): push to correct branch (master/stable) --- tasks/bump.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/bump.js b/tasks/bump.js index 2d4801224..b7859d1fb 100644 --- a/tasks/bump.js +++ b/tasks/bump.js @@ -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 @@ -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'); });