diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-08-29 11:47:37 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-08-29 14:56:15 +0200 |
commit | 79932e72257efe2ea525d546b32b3ecd3988605b (patch) | |
tree | de3516d3ded61c99a74fdc3b7e4cfe6a3591f9b6 /releaser | |
parent | 9eb9b70a29ce84abc754e634e69511c4044e5570 (diff) | |
download | hugo-79932e72257efe2ea525d546b32b3ecd3988605b.tar.gz hugo-79932e72257efe2ea525d546b32b3ecd3988605b.zip |
release: Fix the Deb archives
Fixes #10220
Diffstat (limited to 'releaser')
-rw-r--r-- | releaser/releaser.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/releaser/releaser.go b/releaser/releaser.go index fc16a2572..afb5079a1 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -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 { |