This is an automated email from the ASF dual-hosted git repository.

lorinlee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 2330de7  Fix tools/get_brpc_revision.sh
     new dc15cca  Merge pull request #1536 from v1siuol/fix_get_brpc_revision
2330de7 is described below

commit 2330de7fd8122453a7f1ad0dbbbc169e047b5dda
Author: v1siuol <[email protected]>
AuthorDate: Fri Aug 20 00:07:50 2021 -0400

    Fix tools/get_brpc_revision.sh
---
 tools/get_brpc_revision.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/get_brpc_revision.sh b/tools/get_brpc_revision.sh
index 61c9ab0..f1dd7c2 100755
--- a/tools/get_brpc_revision.sh
+++ b/tools/get_brpc_revision.sh
@@ -16,10 +16,12 @@
 # limitations under the License.
 
 output=$(cat $1/RELEASE_VERSION)
-version=$(git log -1 --format="%h\\|%cI" 2> /dev/null)
+abbr_commit_hash=$(git log -1 --format="%h" 2> /dev/null)
+committer_date=($(git log -1 --format="%ci" 2> /dev/null))
+committer_date="${committer_date[0]}T${committer_date[1]}${committer_date[2]:0:3}:${committer_date[2]:3:2}"
 branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
 if [ $? -eq 0 ]
 then
-    output=$output"\\|"$branch"\\|"$version
+    output=$output"\\|"$branch"\\|"$abbr_commit_hash"\\|"$committer_date
 fi
 echo $output

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to