You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/10/16 15:56:45 UTC
[doris] branch branch-1.1-lts updated: [chore](build release) remove doris home and user info from doris_be --version output (#13344) (#13388)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push:
new 2a54681fc7 [chore](build release) remove doris home and user info from doris_be --version output (#13344) (#13388)
2a54681fc7 is described below
commit 2a54681fc77a4e007a76029b06ff172d9d2491fb
Author: yiguolei <67...@qq.com>
AuthorDate: Sun Oct 16 23:56:38 2022 +0800
[chore](build release) remove doris home and user info from doris_be --version output (#13344) (#13388)
There will be personal info in doris_be --version, like this:
doris-0.0.0-trunk RELEASE (build git://hk-dev01/mnt/disk2/ygl/code/github/apache-doris/be/../@8b7d928af26318f71098f1be2ab03ed83b1955fd)
Built on Wed, 12 Oct 2022 18:36:44 CST by ygl@hk-dev01
Since we always not need this info, commit id is enough, I remove these redundant info, the new result is like this:
doris-0.0.0-trunk RELEASE (build git://hk-dev01@8b7d928)
Built on Thu, 13 Oct 2022 15:03:01 CST by hk-dev01
---
gensrc/script/gen_build_version.sh | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/gensrc/script/gen_build_version.sh b/gensrc/script/gen_build_version.sh
index 5528ef9e31..8c22c39f5e 100755
--- a/gensrc/script/gen_build_version.sh
+++ b/gensrc/script/gen_build_version.sh
@@ -30,9 +30,8 @@ build_version="1.1.3-rc02"
unset LANG
unset LC_CTYPE
-user=$(whoami)
-date=$(date +"%a, %d %b %Y %H:%M:%S %Z")
-hostname=$(hostname)
+date="$(date +"%a, %d %b %Y %H:%M:%S %Z")"
+hostname="$(hostname)"
cwd=$(pwd)
@@ -53,22 +52,16 @@ if [[ -z ${DORIS_TEST_BINARY_DIR} ]]; then
fi
fi
-cd ${DORIS_HOME}
-if [ -d .svn ]; then
- revision=$(svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p')
- short_revision="${revision}"
- url=$(svn info | sed -n -e 's/^URL: \(.*\)/\1/p')
- if echo ${url} | grep '\/tags\/' > /dev/null; then
- build_version="$(echo ${url} | sed 's/.*_\([0-9-]\+\)_PD_BL.*/\1/g' | sed 's/-/\./g')"
- fi
-elif [ -d .git ]; then
- revision=$(git log -1 --pretty=format:"%H")
- short_revision=$(git log -1 --pretty=format:"%h")
- url="git://${hostname}${DORIS_HOME}"
+cd "${DORIS_HOME}"
+
+if [[ -d '.git' ]]; then
+ revision="$(git log -1 --pretty=format:"%H")"
+ short_revision="$(git log -1 --pretty=format:"%h")"
+ url="git://${hostname}"
else
revision="Unknown"
short_revision="${revision}"
- url="file://${DORIS_HOME}"
+ url="file://${hostname}"
fi
cd ${cwd}
@@ -76,7 +69,7 @@ cd ${cwd}
build_hash="${url}@${revision}"
build_short_hash="${short_revision}"
build_time="${date}"
-build_info="${user}@${hostname}"
+build_info="${hostname}"
if [ -z "$JAVA_HOME" ]; then
java_cmd=$(which java)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org