|
|
@ -54,6 +54,14 @@ func GetTagMatchingVersionOrConstraint(tags []string, versionString string) (str
|
|
|
|
// If string is empty, set wildcard constraint
|
|
|
|
// If string is empty, set wildcard constraint
|
|
|
|
constraint, _ = semver.NewConstraint("*")
|
|
|
|
constraint, _ = semver.NewConstraint("*")
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// when customer input exact version, check whether have exact match
|
|
|
|
|
|
|
|
// one first
|
|
|
|
|
|
|
|
for _, v := range tags {
|
|
|
|
|
|
|
|
if versionString == v {
|
|
|
|
|
|
|
|
return v, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Otherwise set constraint to the string given
|
|
|
|
// Otherwise set constraint to the string given
|
|
|
|
var err error
|
|
|
|
var err error
|
|
|
|
constraint, err = semver.NewConstraint(versionString)
|
|
|
|
constraint, err = semver.NewConstraint(versionString)
|
|
|
|