Skip to content

Commit

Permalink
Adding tasks for managing semver
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Trevino committed Mar 25, 2015
1 parent 3cd6397 commit bc42842
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
19 changes: 19 additions & 0 deletions gulp.tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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']);
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bc42842

Please sign in to comment.