Merge pull request #97999 from llhuii/hack-version-script-fix-err-to-stdout

hack/lib/version.sh: fix error log to stderr
This commit is contained in:
Kubernetes Prow Robot 2021-01-31 08:39:48 -08:00 committed by GitHub
commit 081f68d685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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