Skip to content

Instantly share code, notes, and snippets.

@frapontillo
Created November 18, 2015 08:08
Show Gist options
  • Save frapontillo/bbccef8bfed657e65841 to your computer and use it in GitHub Desktop.
Save frapontillo/bbccef8bfed657e65841 to your computer and use it in GitHub Desktop.
Gulp Bump Tasks
'use strict';
var gulp = require('gulp');
var bump = require('gulp-bump')();
var bumpTargets = ['package.json', 'bower.json'];
['major', 'minor', 'patch'].forEach(function (type) {
gulp.task('bump:' + type, function () {
gulp.src(bumpTargets)
.pipe(bump({type: type}))
.pipe(gulp.dest('.'));
});
});
['alpha', 'beta', 'nightly'].forEach(function (pre) {
gulp.task('bump:' + pre, function () {
gulp.src(bumpTargets)
.pipe(bump({type: 'prerelease', preid: pre}))
.pipe(gulp.dest('.'));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment