diff --git a/build.assets/tooling/cmd/check/main.go b/build.assets/tooling/cmd/check/main.go index 16fb6dca2f6af..ac1b8fe3172b6 100644 --- a/build.assets/tooling/cmd/check/main.go +++ b/build.assets/tooling/cmd/check/main.go @@ -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()) } diff --git a/build.assets/tooling/cmd/check/main_test.go b/build.assets/tooling/cmd/check/main_test.go index 4c2ab57368c7f..3ca92aab1b9b2 100644 --- a/build.assets/tooling/cmd/check/main_test.go +++ b/build.assets/tooling/cmd/check/main_test.go @@ -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) {