mirror of
https://github.com/apache/doris.git
synced 2026-11-04 07:31:17 +00:00
[Fix](version) Fix unknown doris version when build in git worktree directory (#62935)
In worktree dir, `.git` is not a directory but a file. before: ``` Version: doris-0.0.0-Unknown ``` now: ``` Version: doris-0.0.0-1f18be0330e ```
This commit is contained in:
1 parent
430781b129
commit
c31c82fc7f
1 file changed
+1
-1
@@ -67,7 +67,7 @@ fi
|
||||
|
||||
cd "${DORIS_HOME}"
|
||||
|
||||
if [[ -d '.git' ]]; then
|
||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||
revision="$(git log -1 --pretty=format:"%H")"
|
||||
short_revision="$(git log -1 --pretty=format:"%h")"
|
||||
url="git://${hostname}"
|
||||
|
||||
Reference in new issue
Block a user