Skip to content

Commit

Permalink
default semver constraint for empty string
Browse files Browse the repository at this point in the history
Signed-off-by: Zeyuan Cao <[email protected]>
  • Loading branch information
zywillc authored and chengfang committed Oct 21, 2024
1 parent 4f21ade commit 5625cdb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/image/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ func (img *ContainerImage) GetNewestVersionFromTags(vc *VersionConstraint, tagLi
return nil, err
}
}
} else if vc.Strategy == StrategySemVer {
// The is the special case where an empty string was passed in which
// is equivalent to * or >=0.0.0
semverConstraint, _ = semver.NewConstraint("*")
}
}

Expand Down

0 comments on commit 5625cdb

Please sign in to comment.