Skip to content

Commit

Permalink
Unblocks Agones release PR by waiting for either the Agones dev versi…
Browse files Browse the repository at this point in the history
…on or release version
  • Loading branch information
igooch committed Jan 2, 2025
1 parent 8166704 commit 1a3277e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/upgrade/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,18 @@ func checkHelmStatus(agonesVersion string) string {
log.Fatal("Could not Unmarshal", err)
}

// Remove the commit sha from the DevVersion i.e. from 1.46.0-dev-7168dd3 to 1.46.0-dev
// Remove the commit sha from the DevVersion i.e. from 1.46.0-dev-7168dd3 to 1.46.0-dev or 1.46.0
// for the case of this test running during a new Agones version release PR.
agonesRelease := ""
if agonesVersion == DevVersion {
r := regexp.MustCompile(`1\.\d+\.\d+-dev`)
agonesVersion = r.FindString(DevVersion)
r = regexp.MustCompile(`1\.\d+\.\d`)
agonesRelease = r.FindString(agonesVersion)
}

for _, status := range helmStatus {
if status.AppVersion == agonesVersion {
if (status.AppVersion == agonesVersion) || (status.AppVersion == agonesRelease) {
return status.Status
}
}
Expand Down

0 comments on commit 1a3277e

Please sign in to comment.