mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +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)
|
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(branch, prefix)
|
||||||
version = strings.TrimPrefix(version, "v")
|
version = strings.TrimPrefix(version, "v")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user