Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v9] Do not block apt publishing if there is a more current pre-release #10805

Merged
merged 3 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions build.assets/tooling/cmd/check/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ func checkLatest(ctx context.Context, tag string, gh github.GitHub) error {
if r.GetDraft() {
continue
}
// Because pre-releases are not published to apt, we do not want to
// consider them when making apt publishing decisions.
// see: https://github.com/gravitational/teleport/issues/10800
if semver.Prerelease(r.GetTagName()) != "" {
continue
}
tags = append(tags, r.GetTagName())
}

Expand Down
9 changes: 9 additions & 0 deletions build.assets/tooling/cmd/check/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ func TestCheckLatest(t *testing.T) {
},
wantErr: require.NoError,
},
{ // see https://github.com/gravitational/teleport/issues/10800
desc: "pass-pre-release",
tag: "v8.3.3",
releases: []string{
"v9.0.0-beta.1",
"v8.3.2",
},
wantErr: require.NoError,
},
}
for _, test := range tests {
t.Run(test.desc, func(t *testing.T) {
Expand Down