diff --git a/Changelog.md b/Changelog.md index b41e59e..3c72c11 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,7 @@ +#v68 (2016/06/16) + +* `devel-` is always considered newer than any released go version + #v67 (2016/06/13) * Attempt to handle missing deps a little better. diff --git a/match_test.go b/match_test.go index 502bd0d..67fc20f 100644 --- a/match_test.go +++ b/match_test.go @@ -71,6 +71,7 @@ func TestIsSameOrNewer(t *testing.T) { {`go1.6`, `go1.6`, true}, {`go1.5`, `go1.6`, true}, {`go1.7`, `go1.6`, false}, + {`go1.6`, `devel-8f48efb`, true}, // devel versions are always never } for _, test := range cases { diff --git a/version.go b/version.go index 17fc234..f07cb5d 100644 --- a/version.go +++ b/version.go @@ -8,7 +8,7 @@ import ( "strings" ) -const version = 67 +const version = 68 var cmdVersion = &Command{ Name: "version", @@ -39,6 +39,9 @@ func isSameOrNewer(base, check string) bool { if base == check { return true } + if strings.HasPrefix(check, "devel-") { + return true + } bp := strings.FieldsFunc(base, GoVersionFields) cp := strings.FieldsFunc(check, GoVersionFields) if len(bp) < 2 || len(cp) < 2 {