Skip to content

Commit

Permalink
Updated build task
Browse files Browse the repository at this point in the history
  • Loading branch information
mariaantony-gnanasekaran committed Aug 29, 2018
1 parent af923c6 commit ed21e7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions build/args.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
var yargs = require('yargs');

var argv = yargs.argv,
validBumpTypes = "major|minor|patch|prerelease".split("|"),
bump = (argv.bump || 'patch').toLowerCase();
//validBumpTypes = "major|minor|patch|prerelease".split("|"),
bump = yargs.argv.version

if(validBumpTypes.indexOf(bump) === -1) {
throw new Error('Unrecognized bump "' + bump + '".');
}
// if(validBumpTypes.indexOf(bump) === -1) {
// throw new Error('Unrecognized bump "' + bump + '".');
// }

module.exports = {
bump: bump
};
bump: bump
};
2 changes: 1 addition & 1 deletion build/tasks/prepare-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var args = require('../args');

gulp.task('bump-version', function(){
return gulp.src(['./package.json', './bower.json'])
.pipe(bump({type:args.bump })) //major|minor|patch|prerelease
.pipe(bump({version: args.bump })) //major|minor|patch|prerelease
.pipe(gulp.dest('./'));
});

Expand Down

0 comments on commit ed21e7b

Please sign in to comment.