From 4a10c10802d6eec581ee02402dc023df0189317c Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Thu, 10 Sep 2015 20:50:14 +0200 Subject: [PATCH] Adding task for tagging new releases --- gulpfile.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 4277a46..3d4ab28 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,8 @@ "use strict"; var gulp = require('gulp'); require('require-dir')('./tasks'); +var args = require('yargs').argv; +var git = require('gulp-git'); var version = '0.3.0'; @@ -10,7 +12,17 @@ gulp.task('default', function() { gulp.task('clean', ['clean:cdn', 'clean:zip']); -gulp.task('deploy', ['deploy:cdn', 'deploy:zip']); +gulp.task('tag', ['deploy:cdn', 'deploy:zip'], function() { + if(args.release) { + version = args.version || version; + return git.tag(version, 'Release version ' + version, {cwd: '.'}, function (err) { + if (err) throw err; + return git.push('origin', version, {cwd: '.', args: '--tags'}); + }); + } +}); + +gulp.task('deploy', ['tag']); // can't run all the verification concurrently until sauce-connect-launcher supports // multiple tunnels -- 2.39.5