release_docs.sh 612 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. echo "[^] Pushing docs to github"
  15. cd docs/
  16. git add .
  17. git commit -am "$VERSION release"
  18. git push
  19. git tag -a "v$VERSION" -m "v$VERSION"
  20. git push origin master
  21. git push origin --tags