Skip to content

Commit 2ae47e7

Browse files
committed
Merge branch 'develop' of github.com:PHPOffice/PHPWord into develop
2 parents 35d06cc + de2b7d8 commit 2ae47e7

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-2
lines changed

.travis.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ matrix:
1414
- php: 5.6
1515
- php: hhvm
1616

17+
env:
18+
global:
19+
- secure: "Sq+6bVtnPsu0mWX8DWQ+9bGAjxMcGorksUiHc4YIXEJsuDfVmVlH8tTD547IeCjDAx9MxXerZ2Z4HSjxTB70VEnJPvZMHI/EZn4Ny31YLHEthdZbV5Gd1h0TGp8VOzPKGShvGrtGBX6MvMfgpK4zuieVWbSfdKeecm8ZNLMpUd4="
20+
1721
before_script:
1822
## Composer
1923
# - curl -s http://getcomposer.org/installer | php
2024
# - php composer.phar install --prefer-source
2125
- composer self-update
2226
- composer require dompdf/dompdf:0.6.*
23-
- composer install --prefer-source
27+
- composer install --prefer-source --dev
2428
## PHP_CodeSniffer
2529
- pyrus install pear/PHP_CodeSniffer
2630
- phpenv rehash
@@ -35,6 +39,8 @@ before_script:
3539
#- phpenv rehash
3640
## PHPLOC
3741
#- curl -o phploc.phar https://phar.phpunit.de/phploc.phar
42+
## PHPDocumentor
43+
- mkdir -p build/docs
3844

3945
script:
4046
## PHP_CodeSniffer
@@ -48,3 +54,9 @@ script:
4854
#- php phploc.phar src/
4955
## PHPUnit
5056
- phpunit -c ./ --coverage-text
57+
## PHPDocumentor
58+
- vendor/bin/phpdoc.php -d ./src -t ./build/docs
59+
60+
after_script:
61+
## PHPDocumentor
62+
- bash .travis_shell_after_success.sh

.travis_shell_after_success.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
echo "--DEBUG--"
4+
echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
5+
echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"
6+
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
7+
8+
if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPWord" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then
9+
10+
echo -e "Publishing PHPDoc...\n"
11+
12+
cp -R build/docs $HOME/docs-latest
13+
14+
cd $HOME
15+
git config --global user.email "[email protected]"
16+
git config --global user.name "travis-ci"
17+
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPWord gh-pages > /dev/null
18+
19+
cd gh-pages
20+
echo "--DEBUG : Suppression"
21+
git rm -rf ./docs/$TRAVIS_BRANCH
22+
23+
echo "--DEBUG : Dossier"
24+
mkdir docs
25+
cd docs
26+
mkdir $TRAVIS_BRANCH
27+
28+
echo "--DEBUG : Copie"
29+
cp -Rf $HOME/docs-latest/* ./$TRAVIS_BRANCH/
30+
31+
echo "--DEBUG : Git"
32+
git add -f .
33+
git commit -m "PHPDocumentor (Travis Build : $TRAVIS_BUILD_NUMBER - Branch : $TRAVIS_BRANCH)"
34+
git push -fq origin gh-pages > /dev/null
35+
36+
echo -e "Published PHPDoc to gh-pages.\n"
37+
38+
fi

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"ext-zip": "*"
3838
},
3939
"require-dev": {
40-
"phpunit/phpunit": "3.7.*"
40+
"phpunit/phpunit": "3.7.*",
41+
"phpdocumentor/phpdocumentor":"2.*"
4142
},
4243
"suggest": {
4344
"ext-gd2": "Required to add images",

0 commit comments

Comments
 (0)