Pico/_build/deploy-phpdoc-release.sh

30 lines
841 B
Bash
Raw Normal View History

2015-11-25 23:29:14 +00:00
#!/usr/bin/env bash
[ "$DEPLOY_PHPDOC_RELEASES" == "true" ] || exit
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
PHPDOC_GIT_DIR="$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID.git"
PHPDOC_CACHE_DIR="$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID.cache"
2015-11-30 14:11:28 +00:00
PHPDOC_TARGET_DIR="$PHPDOC_GIT_DIR/phpDoc/$PHPDOC_ID"
2015-11-25 23:29:14 +00:00
# clone repo
echo "Cloning repo..."
git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$PHPDOC_GIT_DIR"
[ $? -eq 0 ] || exit 1
cd "$PHPDOC_GIT_DIR"
echo
# generate phpDocs
2015-11-25 23:29:14 +00:00
generate-phpdoc.sh \
2015-11-29 23:52:19 +00:00
"$TRAVIS_BUILD_DIR/.phpdoc.xml" \
"$PHPDOC_CACHE_DIR" "$PHPDOC_TARGET_DIR" \
"Pico 1.0 API Documentation ($TRAVIS_TAG)"
2015-11-25 23:29:14 +00:00
[ $? -eq 0 ] || exit 1
# deploy phpDocs
2015-11-25 23:29:14 +00:00
deploy-phpdoc.sh \
"Update phpDocumentor class docs for $TRAVIS_TAG" \
"$TRAVIS_REPO_SLUG" "tags/$TRAVIS_TAG" "$TRAVIS_COMMIT"
2015-11-25 23:29:14 +00:00
[ $? -eq 0 ] || exit 1