release: Fix the Deb archives

Fixes #10220
This commit is contained in:
Bjørn Erik Pedersen
2022-08-29 11:47:37 +02:00
parent 9eb9b70a29
commit 79932e7225
4 changed files with 12 additions and 7 deletions

View File

@@ -40,14 +40,17 @@ func New(skipPush, try bool, step int) (*ReleaseHandler, error) {
if err != nil {
return nil, err
}
branch = strings.TrimSpace(branch)
if !strings.HasPrefix(branch, prefix) {
return nil, fmt.Errorf("branch %q is not a release branch", branch)
}
logf("Branch: %s\n", branch)
version := strings.TrimPrefix(branch, prefix)
version = strings.TrimPrefix(version, "v")
logf("Branch: %s|Version: v%s\n", branch, version)
rh := &ReleaseHandler{branchVersion: version, skipPush: skipPush, try: try, step: step}
if try {