Skip to content

Commit

Permalink
fix(params): Restores versionName in CLI
Browse files Browse the repository at this point in the history
Restores versionName in CLI as it can not be specified otherwise.
Fixes the version of `git-changelog` to point to the version
declared in package.json
  • Loading branch information
xcambar committed Feb 4, 2016
1 parent 5f02433 commit 1d97f95
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ var options = _.defaults({}, defaults);
if (process.argv.join('').replace(/\\/g,'/').indexOf('/grunt') === -1) {

program
.version('0.1.7')
.version(require('../package').version)
.option('-e, --extended', 'Extended log')
.option('-n, --version_name [version_name]', 'Name of the version')
.option('-a, --app_name [app_name]', 'Name [app_name]')
.option('-b, --branch [branch_name]', 'Branch name [branch_name]')
.option('-f, --file [file]', 'File [file]')
Expand All @@ -31,6 +32,10 @@ if (process.argv.join('').replace(/\\/g,'/').indexOf('/grunt') === -1) {
options.tag = false;
}

if (program.version_name){
options.versionName = program.version_name;
}

if (program.app_name){
options.app_name = program.app_name;
}
Expand Down

0 comments on commit 1d97f95

Please sign in to comment.