mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
common/hugo: Fix version logic
[ci skip]
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
1de333e7a3
commit
7bc3401eb5
@@ -231,9 +231,9 @@ func (r *ReleaseHandler) bumpVersions(ver hugo.Version) error {
|
||||
}
|
||||
|
||||
if err := r.replaceInFile("common/hugo/version_current.go",
|
||||
`Number:(\s{4,})(.*),`, fmt.Sprintf(`Number:${1}%.2f,`, ver.Number),
|
||||
`PatchLevel:(\s*)(.*),`, fmt.Sprintf(`PatchLevel:${1}%d,`, ver.PatchLevel),
|
||||
`Suffix:(\s{4,})".*",`, fmt.Sprintf(`Suffix:${1}"%s",`, toDev)); err != nil {
|
||||
`Minor:(\s*)(\d*),`, fmt.Sprintf(`Number:${1}%d,`, ver.Minor),
|
||||
`PatchLevel:(\s*)(\d*),`, fmt.Sprintf(`PatchLevel:${1}%d,`, ver.PatchLevel),
|
||||
`Suffix:(\s*)".*",`, fmt.Sprintf(`Suffix:${1}"%s",`, toDev)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user