complement.sh 793 B

12345678910111213141516171819202122
  1. #! /bin/bash -eu
  2. # This script is designed for developers who want to test their code
  3. # against Complement.
  4. #
  5. # It makes a Synapse image which represents the current checkout,
  6. # then downloads Complement and runs it with that image.
  7. cd "$(dirname $0)/.."
  8. # Build the base Synapse image from the local checkout
  9. docker build -t matrixdotorg/synapse:latest -f docker/Dockerfile .
  10. # Download Complement
  11. wget -N https://github.com/matrix-org/complement/archive/master.tar.gz
  12. tar -xzf master.tar.gz
  13. cd complement-master
  14. # Build the Synapse image from Complement, based on the above image we just built
  15. docker build -t complement-synapse -f dockerfiles/Synapse.Dockerfile ./dockerfiles
  16. # Run the tests on the resulting image!
  17. COMPLEMENT_BASE_IMAGE=complement-synapse go test -v -count=1 ./tests