This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
PayPal-PHP-SDK/generate-api.sh
Jay Patel 26ee383c73 Travis to Update gh-pages with more information
- Minor Improvements
2015-02-11 17:06:37 -06:00

31 lines
745 B
Bash

#!/bin/sh
# Get ApiGen.phar
wget http://www.apigen.org/apigen.phar
# Generate Api
php apigen.phar generate --template-theme="bootstrap" -s lib -d ../gh-pages/docs
# Copy Home Page from Master Branch to Gh-Pages folder
cp -r docs/* ../gh-pages/
# Copy samples
cp -r sample ../gh-pages/sample
# As PHP is not allowed in Github
cp sample/index.php ../gh-pages/sample/index.html
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