complement.sh: ensure old complement checkout files are deleted; remove -N wget flag (#19592)

This commit is contained in:
Andrew Morgan
2026-03-20 16:30:03 +00:00
committed by GitHub
parent 9edbf56969
commit 2c412ba24a
2 changed files with 12 additions and 1 deletions

1
changelog.d/19592.misc Normal file
View File

@@ -0,0 +1 @@
Ensure old Complement test files are removed when downloading a Complement checkout via `./scripts-dev/complement.sh`.

View File

@@ -160,8 +160,18 @@ main() {
if [[ -z "$COMPLEMENT_DIR" ]]; then
COMPLEMENT_REF=${COMPLEMENT_REF:-main}
echo "COMPLEMENT_DIR not set. Fetching Complement checkout from ${COMPLEMENT_REF}..."
wget -Nq https://github.com/matrix-org/complement/archive/${COMPLEMENT_REF}.tar.gz
# Download the Complement checkout at the specified ref.
wget -q https://github.com/matrix-org/complement/archive/${COMPLEMENT_REF}.tar.gz
# Delete the existing complement checkout. Otherwise we'll end up with stale
# test files after they're deleted server-side, and `tar` will not delete
# old files.
rm -rf complement-${COMPLEMENT_REF}
# Extract the checkout.
tar -xzf ${COMPLEMENT_REF}.tar.gz
COMPLEMENT_DIR=complement-${COMPLEMENT_REF}
echo "Checkout available at 'complement-${COMPLEMENT_REF}'"
fi