Masterminds / semver

Work with Semantic Versions in Go
MIT License
1.21k stars 150 forks source link

Not incrementing patch properly #251

Closed joe-at-startupmedia closed 7 hours ago

joe-at-startupmedia commented 7 hours ago

I have the following code:

package main

import (
    "fmt"

    "github.com/Masterminds/semver/v3"
)

func main() {
    semverPtr, _ := semver.StrictNewVersion("1.0.0-alpha.1")
    fmt.Println(semverPtr.IncPatch())
}

Expected Output:

1.0.1

Actual Output

1.0.0

Is this not a bug or am I missing something?

joe-at-startupmedia commented 7 hours ago

I suppose documentation in the code answers my question. Closing.... https://github.com/Masterminds/semver/blob/e6e3d4d3cb1073f0ab8fb3d4be0869d1687b75f9/version.go#L285