Merge branch 'develop' of github.com:PHPOffice/PHPWord into develop

This commit is contained in:
Ivan Lanin 2014-05-04 17:58:57 +07:00
commit 2ae47e738b
3 changed files with 53 additions and 2 deletions

View File

@ -14,13 +14,17 @@ matrix:
- php: 5.6
- php: hhvm
env:
global:
- secure: "Sq+6bVtnPsu0mWX8DWQ+9bGAjxMcGorksUiHc4YIXEJsuDfVmVlH8tTD547IeCjDAx9MxXerZ2Z4HSjxTB70VEnJPvZMHI/EZn4Ny31YLHEthdZbV5Gd1h0TGp8VOzPKGShvGrtGBX6MvMfgpK4zuieVWbSfdKeecm8ZNLMpUd4="
before_script:
## Composer
# - curl -s http://getcomposer.org/installer | php
# - php composer.phar install --prefer-source
- composer self-update
- composer require dompdf/dompdf:0.6.*
- composer install --prefer-source
- composer install --prefer-source --dev
## PHP_CodeSniffer
- pyrus install pear/PHP_CodeSniffer
- phpenv rehash
@ -35,6 +39,8 @@ before_script:
#- phpenv rehash
## PHPLOC
#- curl -o phploc.phar https://phar.phpunit.de/phploc.phar
## PHPDocumentor
- mkdir -p build/docs
script:
## PHP_CodeSniffer
@ -48,3 +54,9 @@ script:
#- php phploc.phar src/
## PHPUnit
- phpunit -c ./ --coverage-text
## PHPDocumentor
- vendor/bin/phpdoc.php -d ./src -t ./build/docs
after_script:
## PHPDocumentor
- bash .travis_shell_after_success.sh

View File

@ -0,0 +1,38 @@
#!/bin/bash
echo "--DEBUG--"
echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPWord" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then
echo -e "Publishing PHPDoc...\n"
cp -R build/docs $HOME/docs-latest
cd $HOME
git config --global user.email "travis@travis-ci.org"
git config --global user.name "travis-ci"
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPWord gh-pages > /dev/null
cd gh-pages
echo "--DEBUG : Suppression"
git rm -rf ./docs/$TRAVIS_BRANCH
echo "--DEBUG : Dossier"
mkdir docs
cd docs
mkdir $TRAVIS_BRANCH
echo "--DEBUG : Copie"
cp -Rf $HOME/docs-latest/* ./$TRAVIS_BRANCH/
echo "--DEBUG : Git"
git add -f .
git commit -m "PHPDocumentor (Travis Build : $TRAVIS_BUILD_NUMBER - Branch : $TRAVIS_BRANCH)"
git push -fq origin gh-pages > /dev/null
echo -e "Published PHPDoc to gh-pages.\n"
fi

View File

@ -37,7 +37,8 @@
"ext-zip": "*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
"phpunit/phpunit": "3.7.*",
"phpdocumentor/phpdocumentor":"2.*"
},
"suggest": {
"ext-gd2": "Required to add images",