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

When preleases are allowed for demo sandbox, simply choose the latest release #407

Merged
merged 1 commit into from
May 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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