diff --git a/gulp.tasks.js b/gulp.tasks.js index 7c30b40..e681e4e 100644 --- a/gulp.tasks.js +++ b/gulp.tasks.js @@ -8,6 +8,10 @@ var gulp = require('gulp'), runSequence = require('run-sequence'), istanbul = require('gulp-istanbul'), coveralls = require('gulp-coveralls'), + git = require('gulp-git'), + bump = require('gulp-bump'), + filter = require('gulp-filter'), + tag_version = require('gulp-tag-version'), isparta = require('isparta'), del = require('del'), MOCHA_REPORTER = 'nyan', @@ -122,4 +126,19 @@ gulp.task('release', (cb) => { cb ); }); + +/** + * Release Flow + */ +let inc = (importance) => { + return gulp.src(['./package.json']) + .pipe(bump({type: importance})) + .pipe(gulp.dest('./')) + .pipe(git.commit('bumps package version')) + .pipe(filter('package.json')) + .pipe(tag_version()); +}; +gulp.task('bump:patch', () => { return inc('patch'); }); +gulp.task('bump:minor', () => { return inc('minor'); }); +gulp.task('bump:major', () => { return inc('major'); }); gulp.task('default', ['build']); diff --git a/package.json b/package.json index 54bff3c..07b6530 100644 --- a/package.json +++ b/package.json @@ -31,13 +31,17 @@ "express": "^4.12.2", "gulp": "^3.8.11", "gulp-babel": "^4.0.0", + "gulp-bump": "^0.3.0", "gulp-changed": "^1.1.1", "gulp-cli": "^0.1.5", "gulp-coveralls": "^0.1.3", + "gulp-filter": "^2.0.2", + "gulp-git": "^1.1.0", "gulp-istanbul": "^0.6.0", "gulp-jscs": "^1.4.0", "gulp-jshint": "^1.9.2", "gulp-mocha": "^2.0.0", + "gulp-tag-version": "^1.2.1", "isparta": "^2.2.0", "run-sequence": "^1.0.2", "supertest": "^0.15.0"