From 0aff36fc745e28ecdc0905ecaa9cf5ab8344206b Mon Sep 17 00:00:00 2001 From: mck Date: Wed, 18 Oct 2023 16:13:06 +0200 Subject: [PATCH] When generating dtest jars and switching between branches, do git clean before git reset patch by Mick Semb Wever; reviewed by Stefan Miklosovic for CASSANDRA-18936 --- .build/run-tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.build/run-tests.sh b/.build/run-tests.sh index cf5ddcc1b8..6736a159b5 100755 --- a/.build/run-tests.sh +++ b/.build/run-tests.sh @@ -96,7 +96,6 @@ _build_all_dtest_jars() { rm -fR ${TMP_DIR}/cassandra-dtest-jars pushd $TMP_DIR >/dev/null until git clone --quiet --depth 1 --no-single-branch https://github.com/apache/cassandra.git cassandra-dtest-jars ; do echo "git clone failed… trying again… " ; done - chmod -R ag+rwx cassandra-dtest-jars popd >/dev/null fi @@ -105,7 +104,7 @@ _build_all_dtest_jars() { pushd ${TMP_DIR}/cassandra-dtest-jars >/dev/null for branch in cassandra-4.0 cassandra-4.1 cassandra-5.0 ; do - git reset --hard HEAD && git clean -qxdff || echo "failed to reset/clean ${TMP_DIR}/cassandra-dtest-jars… continuing…" + git clean -qxdff && git reset --hard HEAD || echo "failed to reset/clean ${TMP_DIR}/cassandra-dtest-jars… continuing…" git checkout --quiet $branch dtest_jar_version=$(grep 'property\s*name=\"base.version\"' build.xml |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p') if [ -f "${DIST_DIR}/dtest-${dtest_jar_version}.jar" ] ; then