You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by zc...@apache.org on 2026/04/29 07:22:46 UTC
(doris) branch master updated: [Fix](version) Fix unknown doris version when build in git worktree directory (#62935)
This is an automated email from the ASF dual-hosted git repository.
zclllyybb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new c31c82fc7f8 [Fix](version) Fix unknown doris version when build in git worktree directory (#62935)
c31c82fc7f8 is described below
commit c31c82fc7f85554f2ef4da287047848d8becefb6
Author: zclllyybb <zh...@selectdb.com>
AuthorDate: Wed Apr 29 15:22:38 2026 +0800
[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
```
---
gensrc/script/gen_build_version.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gensrc/script/gen_build_version.sh b/gensrc/script/gen_build_version.sh
index 3046976faa9..5b6699f045d 100755
--- a/gensrc/script/gen_build_version.sh
+++ b/gensrc/script/gen_build_version.sh
@@ -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}"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org