release_git.sh 745 B

12345678910111213141516171819202122232425
  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. VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
  13. cd "$REPO_DIR"
  14. # Push build to github
  15. echo "[^] Pushing release commit + tag to Github"
  16. git commit -am "$VERSION release"
  17. git tag -a "v$VERSION" -m "v$VERSION"
  18. git push origin master
  19. git push origin --tags
  20. echo " To finish publishing the release go here:"
  21. echo " https://github.com/ArchiveBox/ArchiveBox/releases/new"