diff --git a/hack/lib/build/version.sh b/hack/lib/build/version.sh index 36d459aa30..40ec0e1293 100644 --- a/hack/lib/build/version.sh +++ b/hack/lib/build/version.sh @@ -45,7 +45,7 @@ function os::build::version::git_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 [[ "${OS_GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)(\.[0-9]+)*([-].*)?$ ]]; then + if [[ "${OS_GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)(\.[0-9]+)*([+].*)?$ ]]; then OS_GIT_MAJOR=${BASH_REMATCH[1]} OS_GIT_MINOR=${BASH_REMATCH[2]} OS_GIT_PATCH=${BASH_REMATCH[3]}