Skip to content

Semver act on all tags #5231

Closed Answered by nicolas-goudry
nicolas-goudry asked this question in Q&A
Discussion options

You must be logged in to vote

After some tinkering, I found out that for some reason 0.0.1-rc250305.095646 is not valid, while 0.0.1-rc.250305095646 is.

Note

As per the spec, it seems that any dot separated identifier which consists only of digits cannot start by 0.

This is valid: 0.0.1-rc.0, 0.0.1-rc.0smthg, 0.0.1-rc.0123smthg
This is not: 0.0.1-rc.01

Flux is working as expected.

If one ends up here, they can run the following code snippet in the Go playground to check if their semver is valid:

package main

import (
	"fmt"

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

func main() {
	v, err := semver.NewVersion("YOUR-SEMVER-HERE")
	if err != nil {
		fmt.Printf("invalid version: %s", err)
	}
	fmt.Printf("version is valid: %s"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nicolas-goudry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant