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.

Revisions

  1. frapontillo revised this gist Nov 18, 2015. No changes.
  2. frapontillo created this gist Nov 18, 2015.
    22 changes: 22 additions & 0 deletions bump.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    '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('.'));
    });
    });