Skip to content

Commit

Permalink
Allow projects to selectively upgrade to pre-release tags (#3164)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna authored May 8, 2024
1 parent 5359497 commit efbe634
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tools/version-tracker/pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,6 @@ var (
BottlerocketHostContainers = []string{"admin", "control"}

CiliumImageDirectories = []string{"cilium", "operator-generic", "cilium-chart"}

ProjectsSupportingPrereleaseTags = []string{"kubernetes-sigs/cluster-api-provider-cloudstack"}
)
6 changes: 5 additions & 1 deletion tools/version-tracker/pkg/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"path/filepath"
"regexp"
"slices"
"strings"

"github.com/aws/eks-anywhere/pkg/semver"
Expand Down Expand Up @@ -146,6 +147,9 @@ func GetLatestRevision(client *github.Client, org, repo, currentRevision string,
}
}
tagNameForSemver := semverRegex.FindString(tagName)
if tagNameForSemver == "" {
continue
}

if releaseBranched {
releaseBranch := os.Getenv(constants.ReleaseBranchEnvvar)
Expand All @@ -160,7 +164,7 @@ func GetLatestRevision(client *github.Client, org, repo, currentRevision string,
if err != nil {
return "", false, fmt.Errorf("getting semver for the version under consideration: %v", err)
}
if revisionSemver.Prerelease != "" {
if !slices.Contains(constants.ProjectsSupportingPrereleaseTags, fmt.Sprintf("%s/%s", org, repo)) && revisionSemver.Prerelease != "" {
continue
}

Expand Down

0 comments on commit efbe634

Please sign in to comment.