diff --git a/.phpdoc.xml b/.phpdoc.xml index c46b6da..94996fb 100644 --- a/.phpdoc.xml +++ b/.phpdoc.xml @@ -1,6 +1,6 @@ - <![CDATA[Pico 1.0 API Documentation]]> + <![CDATA[Pico API Documentation]]> _build/phpdoc.cache diff --git a/_build/deploy-phpdoc-branch.sh b/_build/deploy-phpdoc-branch.sh index c4a94a9..720ee15 100755 --- a/_build/deploy-phpdoc-branch.sh +++ b/_build/deploy-phpdoc-branch.sh @@ -18,6 +18,10 @@ fi DEPLOYMENT_ID="${TRAVIS_BRANCH//\//_}" 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 echo "Cloning repo..." git clone --branch="gh-pages" "https://github.com/$TRAVIS_REPO_SLUG.git" "$DEPLOYMENT_DIR" @@ -33,7 +37,7 @@ github-setup.sh generate-phpdoc.sh \ "$TRAVIS_BUILD_DIR/.phpdoc.xml" \ "$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 [ -n "$(git status --porcelain "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID.cache")" ] || exit 0 diff --git a/_build/deploy-phpdoc-release.sh b/_build/deploy-phpdoc-release.sh index 8d3410e..6ab1042 100755 --- a/_build/deploy-phpdoc-release.sh +++ b/_build/deploy-phpdoc-release.sh @@ -29,10 +29,14 @@ github-setup.sh # generate phpDocs 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 \ "$TRAVIS_BUILD_DIR/.phpdoc.xml" \ "-" "$DEPLOYMENT_DIR/phpDoc/$DEPLOYMENT_ID" \ - "Pico 1.0 API Documentation ($TRAVIS_TAG)" + "$MILESTONE API Documentation ($TRAVIS_TAG)" [ $? -eq 0 ] || exit 1 # commit phpDocs diff --git a/lib/Pico.php b/lib/Pico.php index b73400e..156d0fe 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -4,6 +4,7 @@ * Pico * * Pico is a stupidly simple, blazing fast, flat file CMS. + * * - Stupidly Simple: Pico makes creating and maintaining a * website as simple as editing text files. * - Blazing Fast: Pico is seriously lightweight and doesn't @@ -16,6 +17,7 @@ * for powerful and flexible themes. * - Open Source: Pico is completely free and open source, * released under the MIT license. + * * See for more info. * * @author Gilbert Pellegrom