Skip to content

Commit c634276

Browse files
authored
Merge pull request kubernetes#83497 from pivotal-k8s/allow-custom-tags
Allow users to use custom tags
2 parents ac6c77c + 6b1d1cc commit c634276

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hack/lib/version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ kube::version::get_version_vars() {
6666
fi
6767

6868
# Use git describe to find the version based on tags.
69-
if [[ -n ${KUBE_GIT_VERSION-} ]] || KUBE_GIT_VERSION=$("${git[@]}" describe --tags --abbrev=14 "${KUBE_GIT_COMMIT}^{commit}" 2>/dev/null); then
69+
if [[ -n ${KUBE_GIT_VERSION-} ]] || KUBE_GIT_VERSION=$("${git[@]}" describe --tags --match='v*' --abbrev=14 "${KUBE_GIT_COMMIT}^{commit}" 2>/dev/null); then
7070
# This translates the "git describe" to an actual semver.org
7171
# compatible semantic version that looks something like this:
7272
# v1.1.0-alpha.0.6+84c76d1142ea4d

0 commit comments

Comments
 (0)