pull/4549/merge
Matthew Fisher 7 years ago committed by GitHub
commit ac249eb1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -37,7 +37,7 @@ func IsCompatible(client, server string) bool {
return false
}
constraint := fmt.Sprintf("^%d.%d.x", cv.Major(), cv.Minor())
constraint := fmt.Sprintf("^%d.x.x", cv.Major())
if cv.Prerelease() != "" || sv.Prerelease() != "" {
constraint = cv.String()
}

@ -32,7 +32,7 @@ func TestIsCompatible(t *testing.T) {
{"v2.0.0", "v2.0.1", true},
{"v2.0.1", "v2.0.0", true},
{"v2.0.0", "v2.1.1", true},
{"v2.1.0", "v2.0.1", false},
{"v2.1.0", "v2.0.1", true},
}
for _, tt := range tests {

Loading…
Cancel
Save