From ace020c576b939cb7bac782d1c0f3e2f25710509 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Tue, 25 Aug 2020 10:44:32 +0800 Subject: [PATCH] fix(git): make git version check work GitOrigin-RevId: 5f38118f4e249793bcdc1d8c8ad4b13705db45ac --- third_party/prepare.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/third_party/prepare.sh b/third_party/prepare.sh index 25db81b4b..8def3c7a7 100755 --- a/third_party/prepare.sh +++ b/third_party/prepare.sh @@ -4,6 +4,13 @@ cd $(dirname $0) source ../ci/utils.sh +requiredGitVersion="1.8.4" +currentGitVersion="$(git --version | awk '{print $3}')" +if [ "$(printf '%s\n' "$requiredGitVersion" "$currentGitVersion" | sort -V | head -n1)" = "$currentGitVersion" ]; then + echo "Please update your Git version. (foud version $currentGitVersion, required version >= $requiredGitVersion)" + exit -1 +fi + log "Start downloading git submodules" git submodule sync git submodule update -f --init midout -- GitLab