Exclude commas when pulling the tag out of the git export-subst format string
This commit is contained in:
@@ -45,7 +45,7 @@ kube::version::get_version_vars() {
|
|||||||
# When a 'git archive' is exported, the '$Format:%D$' below will look
|
# When a 'git archive' is exported, the '$Format:%D$' below will look
|
||||||
# something like 'HEAD -> release-1.8, tag: v1.8.3' where then 'tag: '
|
# something like 'HEAD -> release-1.8, tag: v1.8.3' where then 'tag: '
|
||||||
# can be extracted from it.
|
# can be extracted from it.
|
||||||
if [[ '$Format:%D$' =~ tag:\ (v[^ ]+) ]]; then
|
if [[ '$Format:%D$' =~ tag:\ (v[^ ,]+) ]]; then
|
||||||
KUBE_GIT_VERSION="${BASH_REMATCH[1]}"
|
KUBE_GIT_VERSION="${BASH_REMATCH[1]}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user