You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ji...@apache.org on 2023/10/27 08:28:35 UTC

[doris] branch master updated: [Enhancement](submodule) print current submodule commit id when building (#26017)

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

jianliangqi 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 11e04f76fb8 [Enhancement](submodule) print current submodule commit id when building (#26017)
11e04f76fb8 is described below

commit 11e04f76fb887c4bb9699f3c210821098c755e80
Author: airborne12 <ai...@gmail.com>
AuthorDate: Fri Oct 27 16:28:27 2023 +0800

    [Enhancement](submodule) print current submodule commit id when building (#26017)
---
 build.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/build.sh b/build.sh
index 9c8f415d773..225bad107c6 100755
--- a/build.sh
+++ b/build.sh
@@ -281,6 +281,13 @@ update_submodule() {
     echo "Update ${submodule_name} submodule ..."
     git submodule update --init --recursive "${submodule_path}"
     exit_code=$?
+    if [[ "${exit_code}" -eq 0 ]]; then
+        cd "${submodule_path}"
+        submodule_commit_id=$(git rev-parse HEAD)
+        cd -
+        expect_submodule_commit_id=$(git ls-tree HEAD "${submodule_path}" | awk '{print $3}')
+        echo "Current commit ID of ${submodule_name} submodule: ${submodule_commit_id}, expected is ${expect_submodule_commit_id}"
+    fi
     set -e
     if [[ "${exit_code}" -ne 0 ]]; then
         set +e


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org