Commit 373cf77a authored by Brendan Burns's avatar Brendan Burns

Adjust the regexp so that we can handle extra sub versions.

parent 5c31fedf
...@@ -60,10 +60,10 @@ kube::version::get_version_vars() { ...@@ -60,10 +60,10 @@ kube::version::get_version_vars() {
# Try to match the "git describe" output to a regex to try to extract # 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 # the "major" and "minor" versions and whether this is the exact tagged
# version or whether the tree is between two tagged versions. # version or whether the tree is between two tagged versions.
if [[ "${KUBE_GIT_VERSION}" =~ ^v([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_MAJOR=${BASH_REMATCH[1]}
KUBE_GIT_MINOR=${BASH_REMATCH[2]} KUBE_GIT_MINOR=${BASH_REMATCH[2]}
if [[ -n "${BASH_REMATCH[3]}" ]]; then if [[ -n "${BASH_REMATCH[4]}" ]]; then
KUBE_GIT_MINOR+="+" KUBE_GIT_MINOR+="+"
fi fi
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment