release_brew.sh 719 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env bash
  2. ### Bash Environment Setup
  3. # http://redsymbol.net/articles/unofficial-bash-strict-mode/
  4. # https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
  5. # set -o xtrace
  6. set -o errexit
  7. set -o errtrace
  8. set -o nounset
  9. set -o pipefail
  10. IFS=$'\n'
  11. REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
  12. CURRENT_PLAFORM="$(uname)"
  13. REQUIRED_PLATFORM="Darwin"
  14. if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then
  15. echo "[!] Skipping the Homebrew package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)."
  16. exit 0
  17. fi
  18. cd "$REPO_DIR"
  19. ./bin/build_brew.sh
  20. git add '*.bottle.tar.gz'
  21. git commit -m "add new release bottle"
  22. git pull
  23. git push