download-binaries 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. function usage() {
  3. >&2 cat << EOM
  4. Download Linux, Mac OS and Windows binaries from remote endpoints
  5. Usage:
  6. $0 <version>
  7. Options:
  8. version version string for the release (ex: 1.6.0)
  9. EOM
  10. exit 1
  11. }
  12. [ -n "$1" ] || usage
  13. VERSION=$1
  14. BASE_BINTRAY_URL=https://dl.bintray.com/docker-compose/bump-$VERSION/
  15. DESTINATION=binaries-$VERSION
  16. APPVEYOR_URL=https://ci.appveyor.com/api/projects/docker/compose/\
  17. artifacts/dist%2Fdocker-compose-Windows-x86_64.exe?branch=bump-$VERSION
  18. mkdir $DESTINATION
  19. wget -O $DESTINATION/docker-compose-Darwin-x86_64 $BASE_BINTRAY_URL/docker-compose-Darwin-x86_64
  20. wget -O $DESTINATION/docker-compose-Linux-x86_64 $BASE_BINTRAY_URL/docker-compose-Linux-x86_64
  21. wget -O $DESTINATION/docker-compose-Windows-x86_64.exe $APPVEYOR_URL
  22. echo -e "\n\nCopy the following lines into the integrity check table in the release notes:\n\n"
  23. cd $DESTINATION
  24. rm -rf *.sha256
  25. ls | xargs sha256sum | sed 's/ / | /g' | sed -r 's/([^ |]+)/`\1`/g'
  26. ls | xargs -I@ bash -c "sha256sum @ | cut -d' ' -f1 > @.sha256"
  27. cd -