releaser: Correctly set final version on patch releases

This commit is contained in:
Bjørn Erik Pedersen 2017-10-19 07:12:23 +02:00
parent d2b3f00df7
commit e939aaed8b
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F
1 changed files with 1 additions and 5 deletions

View File

@ -53,17 +53,13 @@ type ReleaseHandler struct {
func (r ReleaseHandler) calculateVersions() (helpers.HugoVersion, helpers.HugoVersion) {
newVersion := helpers.MustParseHugoVersion(r.cliVersion)
finalVersion := newVersion
finalVersion := newVersion.Next()
finalVersion.PatchLevel = 0
if newVersion.Suffix != "-test" {
newVersion.Suffix = ""
}
if newVersion.PatchLevel == 0 {
finalVersion = finalVersion.Next()
}
finalVersion.Suffix = "-DEV"
return newVersion, finalVersion