aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2015-09-10 20:50:14 +0200
committerManolo Carrasco <manolo@apache.org>2015-09-10 20:50:14 +0200
commit4a10c10802d6eec581ee02402dc023df0189317c (patch)
tree3e2769ce2051bb7300581183b66e470ffdc9fd7c /gulpfile.js
parent99edae75442ffbf3543f4eca18ee0fb51bd8c5c6 (diff)
downloadvaadin-core-4a10c10802d6eec581ee02402dc023df0189317c.tar.gz
vaadin-core-4a10c10802d6eec581ee02402dc023df0189317c.zip
Adding task for tagging new releases
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js14
1 files changed, 13 insertions, 1 deletions
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