diff options
Diffstat (limited to 'util/update_snapshot_docs.sh')
-rwxr-xr-x | util/update_snapshot_docs.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/util/update_snapshot_docs.sh b/util/update_snapshot_docs.sh new file mode 100755 index 0000000..aae5fa0 --- /dev/null +++ b/util/update_snapshot_docs.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# see http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/ for details + +set -e -u + +if [ "$TRAVIS_REPO_SLUG" == "google/jimfs" ] && \ + [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && \ + [ "$TRAVIS_PULL_REQUEST" == "false" ] && \ + [ "$TRAVIS_BRANCH" == "master" ]; then + echo "Publishing Javadoc and JDiff..." + + cd $HOME + git clone -q -b gh-pages https://${GH_TOKEN}@github.com/google/jimfs gh-pages > /dev/null + cd gh-pages + + git config --global user.email "travis@travis-ci.org" + git config --global user.name "travis-ci" + + ./updaterelease.sh snapshot + + git push -fq origin gh-pages > /dev/null + + echo "Javadoc published to gh-pages." +fi |