Skip to content

Commit

Permalink
release task fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuwen Qian committed Mar 4, 2016
1 parent 15bf733 commit 914c354
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions gulp/tasks/release.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
(function() {
'use strict';

//node packages
var minimist = require('minimist');

//stream/gulp related
var merge = require('merge-stream');
var es = require('event-stream');
Expand All @@ -19,24 +16,18 @@
.pipe(gulp.dest(C.ROOT));
}

gulp.task('release', function() {
var argv = minimist(process.argv.slice(3)),
version = argv.v || argv.version,
valid = ['major', 'minor', 'patch'];

if(valid.indexOf(version) > -1) {
run(inc(version), 'build:prod', 'changelog', 'stage-release', 'tag-release');
}
});
gulp.task('bump:major', inc('major'));
gulp.task('bump:minor', inc('minor'));
gulp.task('bump:patch', inc('patch'));

gulp.task('release:major', function() {
run(inc('major'), 'build:prod', 'changelog', 'stage-release', 'tag-release');
run('bump:major', 'build:prod', 'changelog', 'stage-release', 'tag-release');
});
gulp.task('release:minor', function() {
run(inc('minor'), 'build:prod', 'changelog', 'stage-release', 'tag-release');
run('bump:minor', 'build:prod', 'changelog', 'stage-release', 'tag-release');
});
gulp.task('release:patch', function() {
run(inc('patch'), 'build:prod', 'changelog', 'stage-release', 'tag-release');
run('bump:patch', 'build:prod', 'changelog', 'stage-release', 'tag-release');
});

gulp.task('changelog', function() {
Expand Down

0 comments on commit 914c354

Please sign in to comment.