mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
hack/lib/version.sh: fix error log to stderr
Since this invalid Semantic Version messages redirecting to stdout will be captured by line 790 at hack/lib/golang.sh: `goldflags="${GOLDFLAGS=-s -w -buildid=} $(kube::version::ldflags)"` This happens when only no valid tag exists in repo
This commit is contained in:
parent
e0b2787ee1
commit
36aa8a24ce
@ -108,8 +108,8 @@ kube::version::get_version_vars() {
|
||||
|
||||
# If KUBE_GIT_VERSION is not a valid Semantic Version, then refuse to build.
|
||||
if ! [[ "${KUBE_GIT_VERSION}" =~ ^v([0-9]+)\.([0-9]+)(\.[0-9]+)?(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
|
||||
echo "KUBE_GIT_VERSION should be a valid Semantic Version. Current value: ${KUBE_GIT_VERSION}"
|
||||
echo "Please see more details here: https://semver.org"
|
||||
kube::log::error "KUBE_GIT_VERSION should be a valid Semantic Version. Current value: ${KUBE_GIT_VERSION}"
|
||||
kube::log::error "Please see more details here: https://semver.org"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user