diff --git a/release/release b/release/release index bf7909c5b..b45f19607 100755 --- a/release/release +++ b/release/release @@ -232,6 +232,10 @@ function createRelease(options) { } var newVersion = options.amend ? lastVersion : (options.version || semver.inc(lastVersion, 'patch')); + // guard against options.version being commander's version function. any command using this code path needs to explicitly clear the version + // this is the price to pay for using --version with commander + assert(semver.valid(newVersion)); + releases[lastReachableVersion].next = newVersion; var newImageId = options.image ? parseInt(options.image, 10) : releases[lastReachableVersion].imageId; @@ -612,6 +616,7 @@ program.command('publish') program.command('rerelease') .option('--env ', 'Environment (dev/staging/prod)', 'dev') + .option('--version ', 'Create the specified version', null) .description('Make a new release, same as the last release') .action(function (options) { options.rerelease = true; createRelease(options); });