release_git.sh 723 B

1234567891011121314151617181920212223
  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="$(grep '^version = ' "${REPO_DIR}/pyproject.toml" | awk -F'"' '{print $2}')"
  13. cd "$REPO_DIR"
  14. # Push build to github
  15. echo "[^] Pushing release commit + tag to Github"
  16. git tag -f -a "v$VERSION" -m "v$VERSION"
  17. git push origin -f --tags
  18. echo " To finish publishing the release go here:"
  19. echo " https://github.com/ArchiveBox/ArchiveBox/releases/new"