2013-11-21 00:02:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# This script was originally written by maxiaohao in the aws-mock GitHub project.
|
|
|
|
# https://github.com/treelogic-swe/aws-mock/
|
|
|
|
|
|
|
|
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
|
|
|
|
2013-11-24 17:13:33 +00:00
|
|
|
echo "Start to publish lastest Javadoc to gh-pages..."
|
2013-11-21 00:02:33 +00:00
|
|
|
|
|
|
|
cp -R build/docs/javadoc $HOME/javadoc-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/ReadyTalk/avian gh-pages > /dev/null
|
|
|
|
|
|
|
|
cd gh-pages
|
|
|
|
git rm -rf ./javadoc
|
|
|
|
cp -Rf $HOME/javadoc-latest ./javadoc
|
|
|
|
git add -f .
|
|
|
|
git commit -m "Lastest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
|
|
|
|
git push -fq origin gh-pages > /dev/null
|
|
|
|
|
2013-11-24 17:13:33 +00:00
|
|
|
echo "Done magic with auto publishment to gh-pages."
|
2013-11-21 00:02:33 +00:00
|
|
|
fi
|