mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
releaser: Add a way to bust the CircleCI Git cache
This commit is contained in:
@@ -46,6 +46,12 @@ func New(skipPush, try bool, step int) (*ReleaseHandler, error) {
|
||||
return nil, fmt.Errorf("branch %q is not a release branch", branch)
|
||||
}
|
||||
|
||||
// Trim any cache busting suffix, e.g "release-0.90.0-take2"
|
||||
takeIdx := strings.Index(branch, "-take")
|
||||
if takeIdx > 0 {
|
||||
branch = branch[:takeIdx]
|
||||
}
|
||||
|
||||
version := strings.TrimPrefix(branch, prefix)
|
||||
version = strings.TrimPrefix(version, "v")
|
||||
|
||||
|
Reference in New Issue
Block a user