From b5231900b144f5c9242867e777fa3311c61c0900 Mon Sep 17 00:00:00 2001 From: japatel Date: Wed, 11 Feb 2015 12:20:59 -0600 Subject: [PATCH] PHP Docs on gh-pages --- .travis.yml | 32 ++++++++++++++++++-------------- generate-api.sh | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 generate-api.sh diff --git a/.travis.yml b/.travis.yml index 53a172e..e3e53e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,30 @@ language: php php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm +- 5.3 +- 5.4 +- 5.5 +- 5.6 +- hhvm matrix: allow_failures: - - php: hhvm + - php: hhvm fast_finish: true before_script: - - composer self-update - - composer install --dev - - composer require satooshi/php-coveralls:* --dev +- composer self-update +- composer install --dev +- composer require satooshi/php-coveralls:* --dev script: - - mkdir build - - mkdir build/coverage - - phpunit +- mkdir build +- mkdir build/coverage +- phpunit after_success: - - php vendor/bin/coveralls -v -c .coveralls.yml +- php vendor/bin/coveralls -v -c .coveralls.yml +- if [ $TRAVIS_PHP_VERSION = '5.6' ]; then sh generate-api.sh; fi notifications: email: recipients: - - DL-PP-PHP-SDK@ebay.com + - DL-PP-PHP-SDK@ebay.com on_success: change +env: + global: + secure: UazgSLMJmrhmO+Do9TDiu8EKop06Xc2Ghi9F/8rx/CLz2FDZ5UDdzDD8uetjfdOnmMV7oadq13FGxJb9YCqTiJPZFpKsGtEr/IcCdpkO2krluLuWw5Veh8YxRG4rcZ+UWS0JpfQ72L9Zp4dMqPRo8SzcfiZV3HMG1uKYKpTSKnM= diff --git a/generate-api.sh b/generate-api.sh new file mode 100644 index 0000000..024ef5c --- /dev/null +++ b/generate-api.sh @@ -0,0 +1,20 @@ +# Get ApiGen.phar +wget http://www.apigen.org/apigen.phar + +# Generate Api +php apigen.phar generate -s lib -d ../gh-pages +cd ../gh-pages + +# Set identity +git config --global user.email "travis@travis-ci.org" +git config --global user.name "Travis" + +# Add branch +git init +git remote add origin https://${GH_TOKEN}@github.com/paypal/PayPal-PHP-SDK.git > /dev/null +git checkout -B gh-pages + +# Push generated files +git add . +git commit -m "API updated" +git push origin gh-pages -fq > /dev/null