download-binaries 977 B

12345678910111213141516171819202122232425262728293031323334353637
  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. ls | xargs sha256sum | sed 's/ / | /g' | sed -r 's/([^ |]+)/`\1`/g'
  25. cd -