Range to verify it's a "SNAPSHOT" Version
Opened this issue · 1 comments
niondir commented
Hi,
I have a Version like this:
semver.MustParse("2.0.5-SNAPSHOT+a9b5fb82")
Now I want to define a "range" that accepts any Version containing "SNAPSHOT" anywhere.
e.g.
range = semver.MustParseRange("???")
range(semver.MustParse("2.0.5-SNAPSHOT+a9b5fb82")) // == true
range(semver.MustParser(2.0.5)) // == false
Is there already something to reflect that case? Or is anything planned?
mamachanko commented
Probably nothing is "planned" because this repo has seen its last change ~4y ago.
As for limiting a range by pre-release identifier, see what vendir
did: https://github.com/carvel-dev/vendir/blob/1ccbd2548aa3656996c3c5b070ae7cf8153abacd/pkg/vendir/cmd/sort_semver.go#L38