Skip to content

Commit 813f99f

Browse files
author
Shlomi Noach
committed
clong gh-ost-ci-env only if not same commit
1 parent 5480646 commit 813f99f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

script/cibuild-gh-ost-replica-tests

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ set -e
44

55
whoami
66

7-
rm -rf ./gh-ost-ci-env
8-
[ -d "gh-ost-ci-env" ] || git clone https://github.com/github/gh-ost-ci-env.git
7+
# Clone gh-ost-ci-env
8+
# Only clone if not already running locally at latest commit
9+
remote_commit=$(git ls-remote https://github.com/github/gh-ost-ci-env.git HEAD | cut -f1)
10+
local_commit=$(cd gh-ost-ci-env && git log --format="%H" -n 1)
11+
if [ "$remote_commit" != "$local_commit" ] ; then
12+
rm -rf ./gh-ost-ci-env
13+
git clone https://github.com/github/gh-ost-ci-env.git
14+
fi
915

1016
test_mysql_version() {
1117
local mysql_version

0 commit comments

Comments
 (0)