Skip to content

Commit

Permalink
Merge pull request #86 from mariaantony-gnanasekaran/master
Browse files Browse the repository at this point in the history
Updated build task to bump specific package version
  • Loading branch information
karthickthangasamy authored Aug 29, 2018
2 parents 8b8bf5e + ed21e7b commit 58f4f36
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 58f4f36

Please sign in to comment.