From 63e2eacd22b5050140f9630d8ec430a54361d228 Mon Sep 17 00:00:00 2001 From: Ryan Phillips Date: Tue, 19 Dec 2017 15:04:56 -0600 Subject: [PATCH] add semver metadata regex * supports v1.9.0+stable.0 --- hack/lib/version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/lib/version.sh b/hack/lib/version.sh index 1e819b6e51a9a..f8cf2ea2b9c3a 100644 --- a/hack/lib/version.sh +++ b/hack/lib/version.sh @@ -89,7 +89,7 @@ kube::version::get_version_vars() { # Try to match the "git describe" output to a regex to try to extract # the "major" and "minor" versions and whether this is the exact tagged # version or whether the tree is between two tagged versions. - if [[ "${KUBE_GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)(\.[0-9]+)?([-].*)?$ ]]; then + if [[ "${KUBE_GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)(\.[0-9]+)?([-].*)?([+].*)?$ ]]; then KUBE_GIT_MAJOR=${BASH_REMATCH[1]} KUBE_GIT_MINOR=${BASH_REMATCH[2]} if [[ -n "${BASH_REMATCH[4]}" ]]; then