trigger_docs_update 768 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. #
  3. # Trigger the job that will update the documentation website.
  4. # Argument:
  5. # version: the version of the new release. This should be a tag in the
  6. # https://github.com/OpenZeppelin/openzeppelin-solidity repository.
  7. set -ev
  8. if [ "$#" -lt 1 ]; then
  9. echo "Usage: $0 <version>"
  10. exit 1
  11. fi
  12. readonly VERSION="$1"
  13. readonly BODY="{
  14. \"request\": {
  15. \"branch\": \"master\",
  16. \"config\": {
  17. \"env\": [\"VERSION=${VERSION}\"]
  18. }
  19. }
  20. }"
  21. curl -s -X POST \
  22. -H "Content-Type: application/json" \
  23. -H "Accept: application/json" \
  24. -H "Travis-API-Version: 3" \
  25. -H "Authorization: token ${DOCS_TRAVIS_API_TOKEN}" \
  26. -d "${BODY}" \
  27. https://api.travis-ci.com/repo/OpenZeppelin%2Fopenzeppelin-docs/requests