clear version field in rerelease
This commit is contained in:
@@ -232,6 +232,10 @@ function createRelease(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var newVersion = options.amend ? lastVersion : (options.version || semver.inc(lastVersion, 'patch'));
|
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;
|
releases[lastReachableVersion].next = newVersion;
|
||||||
|
|
||||||
var newImageId = options.image ? parseInt(options.image, 10) : releases[lastReachableVersion].imageId;
|
var newImageId = options.image ? parseInt(options.image, 10) : releases[lastReachableVersion].imageId;
|
||||||
@@ -612,6 +616,7 @@ program.command('publish')
|
|||||||
|
|
||||||
program.command('rerelease')
|
program.command('rerelease')
|
||||||
.option('--env <dev/staging/prod>', 'Environment (dev/staging/prod)', 'dev')
|
.option('--env <dev/staging/prod>', 'Environment (dev/staging/prod)', 'dev')
|
||||||
|
.option('--version <version>', 'Create the specified version', null)
|
||||||
.description('Make a new release, same as the last release')
|
.description('Make a new release, same as the last release')
|
||||||
.action(function (options) { options.rerelease = true; createRelease(options); });
|
.action(function (options) { options.rerelease = true; createRelease(options); });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user