mirror of
https://github.com/gravitational/teleport
synced 2024-10-19 16:53:57 +00:00
Do not block apt publishing if there is a more current pre-release (#10804)
We do not publish pre-releases to apt repos, but we do publish them to github. That means we need to filter them out when considering if an apt release should be published. We don't want v8.3.3 to be blocked by v9.0.0-dev.1, only by v9.0.0. Honestly, this is a bit of a mess, but it only needs to hold out a bit longer until https://github.com/gravitational/teleport/pull/10746 lands. Contributes to https://github.com/gravitational/teleport/issues/10800
This commit is contained in:
parent
d246dec8a0
commit
eae66c0ed3
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue