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

View file

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