build-binaries 893 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. #
  3. # Build the release binaries
  4. #
  5. . "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
  6. function usage() {
  7. >&2 cat << EOM
  8. Build binaries for the release.
  9. This script requires that 'git config branch.${BRANCH}.release' is set to the
  10. release version for the release branch.
  11. EOM
  12. exit 1
  13. }
  14. BRANCH="$(git rev-parse --abbrev-ref HEAD)"
  15. VERSION="$(git config "branch.${BRANCH}.release")" || usage
  16. REPO=docker/compose
  17. # Build the binaries
  18. script/clean
  19. script/build-linux
  20. # TODO: build osx binary
  21. # script/prepare-osx
  22. # script/build-osx
  23. # TODO: build or fetch the windows binary
  24. echo "You need to build the osx/windows binaries, that step is not automated yet."
  25. echo "Building the container distribution"
  26. script/build-image $VERSION
  27. echo "Create a github release"
  28. # TODO: script more of this https://developer.github.com/v3/repos/releases/
  29. browser https://github.com/$REPO/releases/new