mirror of
https://github.com/vee1e/kubeedge.git
synced 2026-09-01 10:18:33 +00:00
Merge pull request #6925 from sh1vam31/fix-ldflags-warning
hack: redirect git tag warnings to stderr
This commit is contained in:
commit
4f6705b91e
1 changed files with 4 additions and 4 deletions
|
|
@ -59,10 +59,10 @@ kubeedge::version::get_version_info() {
|
||||||
|
|
||||||
GIT_VERSION=$(git describe --tags --abbrev=14 "${GIT_COMMIT}^{commit}" 2>/dev/null)
|
GIT_VERSION=$(git describe --tags --abbrev=14 "${GIT_COMMIT}^{commit}" 2>/dev/null)
|
||||||
if [[ -z "${GIT_VERSION}" ]]; then
|
if [[ -z "${GIT_VERSION}" ]]; then
|
||||||
echo
|
echo >&2
|
||||||
echo "⚠️ No git tags found."
|
echo "⚠️ No git tags found." >&2
|
||||||
echo "⚠️ Falling back to default version: v0.0.0"
|
echo "⚠️ Falling back to default version: v0.0.0" >&2
|
||||||
echo "⚠️ To avoid this, consider running: git fetch --tags"
|
echo "⚠️ To avoid this, consider running: git fetch --tags" >&2
|
||||||
|
|
||||||
GIT_VERSION="v0.0.0"
|
GIT_VERSION="v0.0.0"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue