Skip to content

Commit

Permalink
🐳 use the latest version for the OCI template default version (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
pithecuse527 authored Jul 21, 2024
1 parent 5af8e75 commit 08b0f80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cyclops-ctrl/internal/template/semver.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ func isValidVersion(v string) bool {
}

func resolveSemver(targetVersion string, versions []string) (string, error) {
// if targetVersion is empty, set it to a constraint that matches any version.
if targetVersion == "" {
targetVersion = "> 0.0.0"
}
contstraints, err := semver.NewConstraint(targetVersion)
if err != nil {
return "", nil
Expand Down

0 comments on commit 08b0f80

Please sign in to comment.