Skip to content

Commit

Permalink
feat: added prerelease version
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed Jan 31, 2019
1 parent 65cb041 commit 52eb712
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/npm_publish/lib/interact.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,20 @@ module.exports = function interactPublish (name, opt) {
value: ver
};
});
if (tag !== 'release') {
let prerelease = semver.inc(pkgVersion, 'prerelease', tag);
choices.push({
message: `prerelease (${prerelease})`,
value: prerelease
});
}
return new Select({
name: 'version',
message: 'Chooice a publish version:',
choices: choices
}).run();
}).then((version) => {
publishOpt.version = version;
publishOpt.ver = version;
publishOpt.interact = true;
return autoPublish(pkg, publishOpt);
})
Expand Down

0 comments on commit 52eb712

Please sign in to comment.