Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
When preleases are allowed for demo sandbox, simply choose the latest…
Browse files Browse the repository at this point in the history
… release (#407)

Signed-off-by: Jeev B <[email protected]>
  • Loading branch information
jeevb authored May 28, 2023
1 parent 5cb23b7 commit e5e63ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/github/githubutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,11 @@ func GetSandboxImageSha(tag string, pre bool, g GHRepoService) (string, string,
return "", release.GetTagName(), err
}
for _, v := range releases {
if *v.Prerelease && pre {
// When pre-releases are allowed, simply choose the latest release
if pre {
release = v
break
} else if !*v.Prerelease && !pre {
} else if !*v.Prerelease {
release = v
break
}
Expand Down

0 comments on commit e5e63ba

Please sign in to comment.