Allow overriding the complement ref. (#11766)
Updates complement.sh to read the ref from an environment variable (defaulting to master) when downloading a complement bundle for testing.pull/11782/head
parent
af13a3be29
commit
fa583c2198
|
@ -52,5 +52,5 @@ __pycache__/
|
||||||
book/
|
book/
|
||||||
|
|
||||||
# complement
|
# complement
|
||||||
/complement-master
|
/complement-*
|
||||||
/master.tar.gz
|
/master.tar.gz
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Allow overriding complement commit using `COMPLEMENT_REF`.
|
|
@ -8,7 +8,8 @@
|
||||||
# By default the script will fetch the latest Complement master branch and
|
# By default the script will fetch the latest Complement master branch and
|
||||||
# run tests with that. This can be overridden to use a custom Complement
|
# run tests with that. This can be overridden to use a custom Complement
|
||||||
# checkout by setting the COMPLEMENT_DIR environment variable to the
|
# checkout by setting the COMPLEMENT_DIR environment variable to the
|
||||||
# filepath of a local Complement checkout.
|
# filepath of a local Complement checkout or by setting the COMPLEMENT_REF
|
||||||
|
# environment variable to pull a different branch or commit.
|
||||||
#
|
#
|
||||||
# By default Synapse is run in monolith mode. This can be overridden by
|
# By default Synapse is run in monolith mode. This can be overridden by
|
||||||
# setting the WORKERS environment variable.
|
# setting the WORKERS environment variable.
|
||||||
|
@ -31,11 +32,12 @@ cd "$(dirname $0)/.."
|
||||||
|
|
||||||
# Check for a user-specified Complement checkout
|
# Check for a user-specified Complement checkout
|
||||||
if [[ -z "$COMPLEMENT_DIR" ]]; then
|
if [[ -z "$COMPLEMENT_DIR" ]]; then
|
||||||
echo "COMPLEMENT_DIR not set. Fetching the latest Complement checkout..."
|
COMPLEMENT_REF=${COMPLEMENT_REF:-master}
|
||||||
wget -Nq https://github.com/matrix-org/complement/archive/master.tar.gz
|
echo "COMPLEMENT_DIR not set. Fetching Complement checkout from ${COMPLEMENT_REF}..."
|
||||||
tar -xzf master.tar.gz
|
wget -Nq https://github.com/matrix-org/complement/archive/${COMPLEMENT_REF}.tar.gz
|
||||||
COMPLEMENT_DIR=complement-master
|
tar -xzf ${COMPLEMENT_REF}.tar.gz
|
||||||
echo "Checkout available at 'complement-master'"
|
COMPLEMENT_DIR=complement-${COMPLEMENT_REF}
|
||||||
|
echo "Checkout available at 'complement-${COMPLEMENT_REF}'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build the base Synapse image from the local checkout
|
# Build the base Synapse image from the local checkout
|
||||||
|
|
Loading…
Reference in New Issue