mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Exclude commas when pulling the tag out of the git export-subst format string
This commit is contained in:
parent
ddbd573029
commit
7713453356
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user