File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ Ensure old Complement test files are removed when downloading a Complement checkout via `./scripts-dev/complement.sh`.
Original file line number Diff line number Diff line change @@ -160,8 +160,18 @@ main() {
160160 if [[ -z " $COMPLEMENT_DIR " ]]; then
161161 COMPLEMENT_REF=${COMPLEMENT_REF:- main}
162162 echo " COMPLEMENT_DIR not set. Fetching Complement checkout from ${COMPLEMENT_REF} ..."
163- wget -Nq https://github.com/matrix-org/complement/archive/${COMPLEMENT_REF} .tar.gz
163+
164+ # Download the Complement checkout at the specified ref.
165+ wget -q https://github.com/matrix-org/complement/archive/${COMPLEMENT_REF} .tar.gz
166+
167+ # Delete the existing complement checkout. Otherwise we'll end up with stale
168+ # test files after they're deleted server-side, and `tar` will not delete
169+ # old files.
170+ rm -rf complement-${COMPLEMENT_REF}
171+
172+ # Extract the checkout.
164173 tar -xzf ${COMPLEMENT_REF} .tar.gz
174+
165175 COMPLEMENT_DIR=complement-${COMPLEMENT_REF}
166176 echo " Checkout available at 'complement-${COMPLEMENT_REF} '"
167177 fi
You can’t perform that action at this time.
0 commit comments