Skip to content

Commit 2ebdffb

Browse files
authored
Merge pull request kubernetes-sigs#5270 from ykakarap/git-version-lookup-fix
🐛 Release Tooling: Version calculation script should only use annotated tags
2 parents b8ad4e4 + e231731 commit 2ebdffb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hack/version.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ version::get_version_vars() {
2828
fi
2929

3030
# stolen from k8s.io/hack/lib/version.sh
31-
# Use git describe to find the version based on tags.
32-
if GIT_VERSION=$(git describe --tags --abbrev=14 2>/dev/null); then
31+
# Use git describe to find the version based on annotated tags.
32+
if GIT_VERSION=$(git describe --abbrev=14 --match "v[0-9]*" 2>/dev/null); then
3333
# This translates the "git describe" to an actual semver.org
3434
# compatible semantic version that looks something like this:
3535
# v1.1.0-alpha.0.6+84c76d1142ea4d

0 commit comments

Comments
 (0)