Build system: Use dynamic phpDoc title
This commit is contained in:
parent
6c4f69c107
commit
e01044319a
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<phpdoc>
|
<phpdoc>
|
||||||
<title><![CDATA[Pico 1.0 API Documentation]]></title>
|
<title><![CDATA[Pico API Documentation]]></title>
|
||||||
<parser>
|
<parser>
|
||||||
<target>_build/phpdoc.cache</target>
|
<target>_build/phpdoc.cache</target>
|
||||||
</parser>
|
</parser>
|
||||||
|
@ -18,6 +18,10 @@ fi
|
|||||||
DEPLOYMENT_ID="${TRAVIS_BRANCH//\//_}"
|
DEPLOYMENT_ID="${TRAVIS_BRANCH//\//_}"
|
||||||
DEPLOYMENT_DIR="$TRAVIS_BUILD_DIR/_build/deploy-$DEPLOYMENT_ID.git"
|
DEPLOYMENT_DIR="$TRAVIS_BUILD_DIR/_build/deploy-$DEPLOYMENT_ID.git"
|
||||||
|
|
||||||
|
# get current Pico milestone
|
||||||
|
VERSION="$(php -r 'require_once(__DIR__ . "/lib/Pico.php"); echo Pico::VERSION;')"
|
||||||
|
MILESTONE="Pico$([[ "$VERSION" =~ ^([0-9]+\.[0-9]+)\. ]] && echo " ${BASH_REMATCH[1]}")"
|
||||||
|
|
||||||
# clone repo
|
# clone repo
|
||||||
echo "Cloning repo..."
|
echo "Cloning repo..."
|
||||||
git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$DEPLOYMENT_DIR"
|
git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$DEPLOYMENT_DIR"
|
||||||
@ -33,7 +37,7 @@ github-setup.sh
|
|||||||
generate-phpdoc.sh \
|
generate-phpdoc.sh \
|
||||||
"$TRAVIS_BUILD_DIR/.phpdoc.xml" \
|
"$TRAVIS_BUILD_DIR/.phpdoc.xml" \
|
||||||
"$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID.cache" "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID" \
|
"$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID.cache" "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID" \
|
||||||
"Pico 1.0 API Documentation ($TRAVIS_BRANCH branch)"
|
"$MILESTONE API Documentation ($TRAVIS_BRANCH branch)"
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
[ -n "$(git status --porcelain "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID.cache")" ] || exit 0
|
[ -n "$(git status --porcelain "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID.cache")" ] || exit 0
|
||||||
|
|
||||||
|
@ -29,10 +29,14 @@ github-setup.sh
|
|||||||
|
|
||||||
# generate phpDocs
|
# generate phpDocs
|
||||||
if [ "$DEPLOY_PHPDOC_RELEASES" == "true" ]; then
|
if [ "$DEPLOY_PHPDOC_RELEASES" == "true" ]; then
|
||||||
|
# get current Pico milestone
|
||||||
|
MILESTONE="Pico$([[ "$TRAVIS_TAG" =~ ^v([0-9]+\.[0-9]+)\. ]] && echo " ${BASH_REMATCH[1]}")"
|
||||||
|
|
||||||
|
# generate phpDocs
|
||||||
generate-phpdoc.sh \
|
generate-phpdoc.sh \
|
||||||
"$TRAVIS_BUILD_DIR/.phpdoc.xml" \
|
"$TRAVIS_BUILD_DIR/.phpdoc.xml" \
|
||||||
"-" "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID" \
|
"-" "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID" \
|
||||||
"Pico 1.0 API Documentation ($TRAVIS_TAG)"
|
"$MILESTONE API Documentation ($TRAVIS_TAG)"
|
||||||
[ $? -eq 0 ] || exit 1
|
[ $? -eq 0 ] || exit 1
|
||||||
|
|
||||||
# commit phpDocs
|
# commit phpDocs
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
* Pico
|
* Pico
|
||||||
*
|
*
|
||||||
* Pico is a stupidly simple, blazing fast, flat file CMS.
|
* Pico is a stupidly simple, blazing fast, flat file CMS.
|
||||||
|
*
|
||||||
* - Stupidly Simple: Pico makes creating and maintaining a
|
* - Stupidly Simple: Pico makes creating and maintaining a
|
||||||
* website as simple as editing text files.
|
* website as simple as editing text files.
|
||||||
* - Blazing Fast: Pico is seriously lightweight and doesn't
|
* - Blazing Fast: Pico is seriously lightweight and doesn't
|
||||||
@ -16,6 +17,7 @@
|
|||||||
* for powerful and flexible themes.
|
* for powerful and flexible themes.
|
||||||
* - Open Source: Pico is completely free and open source,
|
* - Open Source: Pico is completely free and open source,
|
||||||
* released under the MIT license.
|
* released under the MIT license.
|
||||||
|
*
|
||||||
* See <http://picocms.org/> for more info.
|
* See <http://picocms.org/> for more info.
|
||||||
*
|
*
|
||||||
* @author Gilbert Pellegrom
|
* @author Gilbert Pellegrom
|
||||||
|
Loading…
x
Reference in New Issue
Block a user