releaser: Correctly set final version on patch releases
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 19 Oct 2017 05:12:23 +0000 (07:12 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 19 Oct 2017 05:12:23 +0000 (07:12 +0200)
releaser/releaser.go

index 1271cf179b2322a525c440483d219626cafb3dd3..02a98fa9f713fed54a3962f0dacac91a4652721d 100644 (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