Permalink
Browse files

Refactor phpDoc generation

  • Loading branch information...
1 parent ff02f34 commit 4be51a7bee682200d73a6e055a0954b74b78082a @PhrozenByte PhrozenByte committed Nov 29, 2015
Showing with 42 additions and 28 deletions.
  1. +6 −4 .gitignore
  2. +23 −16 .phpdoc.xml
  3. +3 −1 _build/deploy-phpdoc-branch.sh
  4. +3 −1 _build/deploy-phpdoc-release.sh
  5. +7 −6 _build/generate-phpdoc.sh
View
@@ -10,15 +10,17 @@ desktop.ini
.DS_Store
._*
-# Travis
-/_build/phpdoc-*/
-/_build/phpdoc-*.git/
-
# Composer
/composer.lock
/composer.phar
/vendor
+# phpDocumentor
+/_build/phpdoc/
+/_build/phpdoc.cache/
+/_build/phpdoc-*/
+/_build/phpdoc-*.git/
+
# User config
/config/config.php
View
@@ -1,25 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
+ <title><![CDATA[Pico 1.0 API Documentation]]></title>
+ <parser>
+ <target>_build/phpdoc.cache</target>
+ </parser>
+ <transformer>
+ <target>_build/phpdoc</target>
+ </transformer>
+ <transformations>
+ <template name="clean"/>
+ </transformations>
<files>
- <directory>lib/*</directory>
- <file>plugins/DummyPlugin.php</file>
+ <directory>.</directory>
+ <file>index.php</file>
+ <file>index.php.dist</file>
+
+ <!-- exclude build environment -->
<ignore>_build/*</ignore>
+
+ <!-- exclude user config -->
<ignore>config/*</ignore>
- <ignore>content-sample/*</ignore>
- <ignore>themes/*</ignore>
+ <file>config/config.php.template</file>
+
+ <!-- exclude all plugins -->
<ignore>plugins/*</ignore>
+ <file>plugins/DummyPlugin.php</file>
+
+ <!-- exclude vendor dir -->
<ignore>vendor/*</ignore>
- <ignore>.htaccess</ignore>
- <ignore>*.git</ignore>
- <ignore>.gitignore</ignore>
- <ignore>*.xml</ignore>
- <ignore>*.yml</ignore>
- <ignore>*.json</ignore>
- <ignore>*.lock</ignore>
- <ignore>*.phar</ignore>
- <ignore>*.md</ignore>
- <ignore>*LICENSE</ignore>
- <ignore>index.php</file>
- <ignore>index.php.dist</ignore>
</files>
</phpdoc>
@@ -18,7 +18,9 @@ fi
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
generate-phpdoc.sh \
- "$TRAVIS_BUILD_DIR" "$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID" \
+ "$TRAVIS_BUILD_DIR/.phpdoc.xml" \
+ "$TRAVIS_BUILD_DIR/_build/phpdoc.cache" \
+ "$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID" \
"Pico 1.0 API Documentation ($TRAVIS_BRANCH branch)"
[ $? -eq 0 ] || exit 1
@@ -5,7 +5,9 @@
PHPDOC_ID="${TRAVIS_BRANCH//\//_}"
generate-phpdoc.sh \
- "$TRAVIS_BUILD_DIR" "$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID" \
+ "$TRAVIS_BUILD_DIR/.phpdoc.xml" \
+ "$TRAVIS_BUILD_DIR/_build/phpdoc.cache" \
+ "$TRAVIS_BUILD_DIR/_build/phpdoc-$PHPDOC_ID" \
"Pico 1.0 API Documentation ($TRAVIS_TAG)"
[ $? -eq 0 ] || exit 1
@@ -2,9 +2,10 @@
set -e
# parameters
-PHPDOC_SOURCE_DIR="$1"
-PHPDOC_TARGET_DIR="$2"
-PHPDOC_TITLE="$3"
+PHPDOC_CONFIG="$1"
+PHPDOC_CACHE_DIR="$3"
+PHPDOC_TARGET_DIR="$4"
+PHPDOC_TITLE="$5"
# print parameters
echo "Generating phpDocs..."
@@ -14,9 +15,9 @@ printf 'PHPDOC_TITLE="%s"\n' "$PHPDOC_TITLE"
echo
# generate phpdoc
-phpdoc -d "$PHPDOC_SOURCE_DIR" \
- -c "$PHPDOC_SOURCE_DIR/.phpdoc.xml" \
- -t "$PHPDOC_TARGET_DIR" \
+phpdoc --config "$PHPDOC_CONFIG" \
+ --cache-folder "$PHPDOC_CACHE_DIR" \
+ --target "$PHPDOC_TARGET_DIR" \
--title "$PHPDOC_TITLE"
echo

0 comments on commit 4be51a7

Please sign in to comment.