feat(pkg/semanticrelease): rc is prerelease, beta & alpha are draft

This commit is contained in:
Felix Wiedmann
2019-06-20 11:39:37 +02:00
parent d36be78c9c
commit 49aaa93cac

View File

@@ -105,9 +105,10 @@ func (s *SemanticRelease) GetNextVersion(force bool) (*shared.ReleaseVersion, er
if currentBranch == branch || strings.HasPrefix(currentBranch, branch) { if currentBranch == branch || strings.HasPrefix(currentBranch, branch) {
log.Debugf("Found branch config for branch %s with release type %s", currentBranch, releaseType) log.Debugf("Found branch config for branch %s with release type %s", currentBranch, releaseType)
switch releaseType { switch releaseType {
case "rc", "beta", "alpha": case "beta", "alpha":
newVersion = s.incPrerelease(releaseType, newVersion)
isDraft = true isDraft = true
case "rc":
newVersion = s.incPrerelease(releaseType, newVersion)
case "release": case "release":
if len(result["major"]) > 0 { if len(result["major"]) > 0 {
newVersion = newVersion.IncMajor() newVersion = newVersion.IncMajor()