提交 38100d90 编写于 作者: F Fabian Raetz

don't exit when "git rev-parse" fails

so that the version number is always echoed on stdout.
上级 ce5fef2a
......@@ -6,7 +6,7 @@ version="$(git describe --tags HEAD 2>/dev/null || true)"
if [ -z "$version" ]; then
version="$(grep Version commands/version.go | head -1 | cut -d '"' -f2)"
sha="$(git rev-parse --short HEAD 2>/dev/null)"
sha="$(git rev-parse --short HEAD 2>/dev/null || true)"
[ -z "$sha" ] || version="${version}-g${sha}"
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册