From 5da1619b092b97b6a345b76475e7e58d695d178a Mon Sep 17 00:00:00 2001 From: maumasi Date: Thu, 20 Oct 2016 23:54:25 -0400 Subject: [PATCH 1/2] auto commit --- gulpfile.js | 14 ++++++++++++-- package.json | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 1e96792..7f91eb7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -41,6 +41,8 @@ gulp.task('push', () => { }); }); + + // bump up the version according to 'patch', 'minor', 'major' gulp.task('patchBump', () => { console.log(testit); @@ -71,6 +73,14 @@ if (argv.patch) { bump = 'major'; } -gulp.task('t', [`${bump}Bump`, 'add', 'commit', 'push'], () => { -console.log(version); +gulp.task('default', [`${bump}Bump`, 'add', 'commit', 'push'], () => { + + const newVersion = require('./package.json').version; + + // Tag the repo with a version + git.tag(`v${newVersion}`, `Version ${newVersion}`, (err) => { + if (err) { + throw err; + } + }); }); diff --git a/package.json b/package.json index e7a8ff5..8919a70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "url-shortener", - "version": "1.6.3", + "version": "1.6.4", "description": "", "main": "index.js", "scripts": { From a1b68898e88bd9547e7eb01bb2d42ccc34d97f60 Mon Sep 17 00:00:00 2001 From: maumasi Date: Thu, 20 Oct 2016 23:56:40 -0400 Subject: [PATCH 2/2] fixed what branch it's being pushed to --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 7f91eb7..c10b8fd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -36,7 +36,7 @@ gulp.task('commit', () => { // remote is the remote repo // branch is the remote branch to push to gulp.task('push', () => { - git.push('origin', 'newLogger', (err) => { + git.push('origin', 'master', (err) => { if (err) throw err; }); });