Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

40 rindas
1.3 KiB

  1. #!/bin/bash
  2. # Build the Debian packages using Docker images.
  3. #
  4. # This script builds the Docker images and then executes them sequentially, each
  5. # one building a Debian package for the targeted operating system. It is
  6. # designed to be a "single command" to produce all the images.
  7. #
  8. # By default, builds for all known distributions, but a list of distributions
  9. # can be passed on the commandline for debugging.
  10. set -ex
  11. cd `dirname $0`
  12. if [ $# -lt 1 ]; then
  13. DISTS=(debian:stretch debian:sid ubuntu:xenial ubuntu:bionic ubuntu:cosmic)
  14. else
  15. DISTS=("$@")
  16. fi
  17. # Make the dir where the debs will live.
  18. #
  19. # Note that we deliberately put this outside the source tree, otherwise we tend
  20. # to get source packages which are full of debs. (We could hack around that
  21. # with more magic in the build_debian.sh script, but that doesn't solve the
  22. # problem for natively-run dpkg-buildpakage).
  23. mkdir -p ../../debs
  24. # Build each OS image;
  25. for i in "${DISTS[@]}"; do
  26. TAG=$(echo ${i} | cut -d ":" -f 2)
  27. docker build --tag dh-venv-builder:${TAG} --build-arg distro=${i} -f Dockerfile-dhvirtualenv .
  28. docker run -it --rm --volume=$(pwd)/../\:/synapse/source:ro --volume=$(pwd)/../../debs:/debs \
  29. -e TARGET_USERID=$(id -u) \
  30. -e TARGET_GROUPID=$(id -g) \
  31. dh-venv-builder:${TAG}
  32. done