Skip to content

Commit b55e47c

Browse files
committed
fix: skip pre-releases when selecting Coder versions for integration tests
The coderversion script was including release candidates when scanning GitHub releases, then stripping the pre-release suffix to form the version string (e.g. v2.32.0-rc.0 → v2.32.0). This caused integration tests to pull a Docker image that doesn't exist yet, failing with "manifest unknown".
1 parent 416eac4 commit b55e47c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/coderversion/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ func main() {
9999
}
100100

101101
type release struct {
102-
TagName string `json:"tag_name"`
102+
TagName string `json:"tag_name"`
103+
Prerelease bool `json:"prerelease"`
103104
}
104105

105106
const releasesURL = "https://api.github.com/repos/coder/coder/releases"
@@ -121,9 +122,8 @@ func fetchReleases() []string {
121122

122123
var ss []string
123124
for _, rel := range releases {
124-
if rel.TagName != "" {
125+
if rel.TagName != "" && !rel.Prerelease {
125126
ss = append(ss, rel.TagName)
126-
127127
}
128128
}
129129
return ss

0 commit comments

Comments
 (0)