From fbf169bacfc2f89c1743797fa64db63129612348 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 24 Nov 2013 11:14:26 -0600 Subject: [PATCH] Use subdirectory in build/ for temporary gh-pages checkout Signed-off-by: Johannes Schindelin --- .utility/push-javadoc-to-gh-pages.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.utility/push-javadoc-to-gh-pages.sh b/.utility/push-javadoc-to-gh-pages.sh index 355b3ae201..53e3a1e585 100755 --- a/.utility/push-javadoc-to-gh-pages.sh +++ b/.utility/push-javadoc-to-gh-pages.sh @@ -8,12 +8,17 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then 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 + if test -d gh-pages + then + cd gh-pages + git pull + else + git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/ReadyTalk/avian gh-pages > /dev/null + cd gh-pages + git config user.email "travis@travis-ci.org" + git config user.name "travis-ci" + fi - cd gh-pages git rm -rf ./javadoc cp -Rf $HOME/javadoc-latest ./javadoc git add -f .