diff --git a/manifests/kustomization.yaml b/manifests/kustomization.yaml index 7d2ae64..0f49909 100644 --- a/manifests/kustomization.yaml +++ b/manifests/kustomization.yaml @@ -13,4 +13,4 @@ resources: images: # Needs to be updated on each new release - name: quay.io/cguertin14/k3supdater - newTag: v1.0.5 + newTag: v1.0.6 diff --git a/pkg/updater/operations.go b/pkg/updater/operations.go index d07243a..d67194f 100644 --- a/pkg/updater/operations.go +++ b/pkg/updater/operations.go @@ -108,6 +108,12 @@ func (c *ClientSet) getLatestK3sRelease(ctx context.Context, req getLatestK3sRel // Find latest stable versions among all releases latestStableVersions := make([]*github.RepositoryRelease, 0) for _, r := range releases { + // Exclude release candidates since + // they're not stable versions + if strings.Contains(*r.Name, "rc") { + continue + } + // Exclude pre-releases, since they're // not fully ready yet if *r.Prerelease { @@ -115,12 +121,6 @@ func (c *ClientSet) getLatestK3sRelease(ctx context.Context, req getLatestK3sRel continue } - // Exclude release candidates since - // they're not stable versions - if strings.Contains(*r.Name, "rc") { - continue - } - // Keep only three releases. if len(latestStableVersions) < 3 { latestStableVersions = append(latestStableVersions, r)