Skip to content

Commit

Permalink
fix(version): Resolve prerelease for version without bump (#2041)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshrmn authored and evocateur committed Apr 24, 2019
1 parent 8ccf844 commit aa11325
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions commands/version/index.js
Expand Up @@ -278,10 +278,9 @@ class VersionCommand extends Command {
const { bump, conventionalCommits, preid } = this.options;
const repoVersion = bump ? semver.clean(bump) : "";
const increment = bump && !semver.valid(bump) ? bump : "";
const isPrerelease = increment.startsWith("pre");

const getExistingPreId = version => (semver.prerelease(version) || []).shift();
const resolvePrereleaseId = existingPreid => preid || (isPrerelease && existingPreid) || "alpha";
const resolvePrereleaseId = existingPreid => preid || existingPreid || "alpha";

const makeGlobalVersionPredicate = nextVersion => {
this.globalVersion = nextVersion;
Expand Down

0 comments on commit aa11325

Please sign in to comment.