Skip to content

Commit e231731

Browse files
author
Yuvaraj Kakaraparthi
committed
use only annotated tags to calculate git version
1 parent b8ad4e4 commit e231731

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)