Skip to content

Commit

Permalink
Merge pull request #2765 from saschagrunert/official-patches-no-rc
Browse files Browse the repository at this point in the history
Stop building rc.0 versions after official patches
  • Loading branch information
k8s-ci-robot authored Mar 9, 2023
2 parents ceac92a + 0671d63 commit 6891f44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions pkg/release/release_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package release

import (
"fmt"
"regexp"
"strconv"
"strings"

Expand Down Expand Up @@ -192,12 +191,6 @@ func GenerateReleaseVersion(

if releaseType == ReleaseTypeOfficial {
releaseVersions.official = releaseVersions.prime
// Only primary branches get rc releases
if regexp.MustCompile(`^release-(\d+)\.(\d+)$`).MatchString(branch) {
releaseVersions.rc = fmt.Sprintf(
"v%d.%d.%d-rc.0", v.Major, v.Minor, v.Patch+1,
)
}
} else if releaseType == ReleaseTypeRC {
releaseVersions.rc = fmt.Sprintf(
"%s-rc.%d", releaseVersions.prime, labelID,
Expand Down
4 changes: 2 additions & 2 deletions pkg/release/release_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ func TestGenerateReleaseVersion(t *testing.T) {
require.Nil(t, err)
require.Equal(t, "v1.18.4", res.Prime())
require.Equal(t, "v1.18.4", res.Official())
require.Equal(t, "v1.18.5-rc.0", res.RC())
require.Empty(t, res.RC())
require.Empty(t, res.Beta())
require.Empty(t, res.Alpha())
require.Equal(t,
[]string{"v1.18.4", "v1.18.5-rc.0"},
[]string{"v1.18.4"},
res.Ordered(),
)
},
Expand Down

0 comments on commit 6891f44

Please sign in to comment.