diff --git a/.gitignore b/.gitignore index 108b372..039d7c5 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ composer.lock # Project var tools + +# Groc +node_modules diff --git a/generate-api.sh b/generate-api.sh index be8c358..bc86de3 100644 --- a/generate-api.sh +++ b/generate-api.sh @@ -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