Enabled auto sample docs generation to master branch

This commit is contained in:
Jay Patel
2016-06-06 13:36:04 -05:00
parent 923665393b
commit c5327dbb1c
2 changed files with 26 additions and 4 deletions

3
.gitignore vendored
View File

@@ -19,3 +19,6 @@ composer.lock
# Project
var
tools
# Groc
node_modules

View File

@@ -1,4 +1,27 @@
#!/bin/sh
# Auto Sample Docs Generation
npm install groc
# Set identity
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis"
# Checkout Master
git fetch; git checkout master;
# Run Docs Generation
cd sample; ../node_modules/groc/bin/groc **/*.php;
# Add and Commit
git add doc; git commit -m "Updates to Sample Docs";
# Push to Master
git push origin master;
# Back to Home
cd ..;
# Get ApiGen.phar
wget http://www.apigen.org/apigen.phar
@@ -15,10 +38,6 @@ 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