diff --git a/.phpdoc.xml b/.phpdoc.xml index c46b6da2fd2df26061a163a2e7b32a93c3d9778d..94996fb3414c23d2d5c80f7540001050dbde5386 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 c4a94a91be638f4552c5c9d9784507998381356e..720ee15d719b6588b285a225d277f6e372779916 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 8d3410e131aec30b2fbcbf65fc617a879e9894c4..6ab10421df0eaefb788389e8823e5a9881790931 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 b73400ee45e84272824d9963cb5a4148c617312f..156d0fe778403dba09455be6bb6bc5c717052a44 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