deploy-phpdoc-release.sh 841 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. [ "$DEPLOY_PHPDOC_RELEASES" == "true" ] || exit
  3. PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
  4. PHPDOC_GIT_DIR="$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID.git"
  5. PHPDOC_CACHE_DIR="$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID.cache"
  6. PHPDOC_TARGET_DIR="$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID"
  7. # clone repo
  8. echo "Cloning repo..."
  9. git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$PHPDOC_GIT_DIR"
  10. [ $? -eq 0 ] || exit 1
  11. cd "$PHPDOC_GIT_DIR"
  12. echo
  13. # generate phpDocs
  14. generate-phpdoc.sh \
  15. "$TRAVIS_BUILD_DIR/.phpdoc.xml" \
  16. "$PHPDOC_CACHE_DIR" "$PHPDOC_TARGET_DIR" \
  17. "Pico 1.0 API Documentation ($TRAVIS_TAG)"
  18. [ $? -eq 0 ] || exit 1
  19. # deploy phpDocs
  20. deploy-phpdoc.sh \
  21. "Update phpDocumentor class docs for $TRAVIS_TAG" \
  22. "$TRAVIS_REPO_SLUG" "tags/$TRAVIS_TAG" "$TRAVIS_COMMIT"
  23. [ $? -eq 0 ] || exit 1