Skip to content

Commit 0ba543f

Browse files
authored
allow releases without the v prefix (#634)
allow releases without the v prefix, and do not require the v prefix to match when comparing backups to restore
1 parent b779369 commit 0ba543f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/release-prod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release
22
on:
33
push:
44
tags:
5-
- "v*.*.*"
5+
- "*.*.*"
66
permissions:
77
contents: write
88
jobs:

cmd/embedded-cluster/restore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ func isBackupRestorable(backup *velerov1.Backup, rel *release.ChannelRelease, is
332332
if backup.Annotations["kots.io/embedded-cluster"] != "true" {
333333
return false, "is not an embedded cluster backup"
334334
}
335-
if v := backup.Annotations["kots.io/embedded-cluster-version"]; v != defaults.Version {
335+
if v := strings.TrimPrefix(backup.Annotations["kots.io/embedded-cluster-version"], "v"); v != strings.TrimPrefix(defaults.Version, "v") {
336336
return false, fmt.Sprintf("has a different embedded cluster version (%q) than the current version (%q)", v, defaults.Version)
337337
}
338338
if backup.Status.Phase != velerov1.BackupPhaseCompleted {

0 commit comments

Comments
 (0)