Skip to content

Commit

Permalink
feat: Adding canary to the ignore list
Browse files Browse the repository at this point in the history
  • Loading branch information
ViBiOh committed Dec 2, 2020
1 parent ac29278 commit 33b4b38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/semver/semver.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

var (
semverMatcher = regexp.MustCompile(`(?i)^[a-zA-Z]*([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:$|(?:[+-](.*)))`)
ignoredSemverDetail = []string{"rc", "beta", "test", "alpha"}
ignoredSemverDetail = []string{"rc", "beta", "test", "canary", "alpha"}

// NoneVersion is the empty semver
NoneVersion = Version{}
Expand Down
8 changes: 8 additions & 0 deletions pkg/semver/semver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ func TestParse(t *testing.T) {
NoneVersion,
errors.New("ignoring test version"),
},
{
"ignore canary",
args{
version: "v10.0.4-canary.1",
},
NoneVersion,
errors.New("ignoring canary version"),
},
{
"ignore alpha",
args{
Expand Down

0 comments on commit 33b4b38

Please sign in to comment.