diff --git a/.travis.yml b/.travis.yml index 18dcccd6af..f451696ff4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,10 @@ language: cpp +env: + global: + secure: NhmSoQSnkmcj5BgBtVTd1X5KIECmFHwss8hzDdNmEtbGe3sIBjZksx1RSP67y/bAhuG9l8rrc0V/yMvCJY8KnjirZE9bhcY8jY8Tl1nRuUbruT7QEoufhCi79+9U1KA62PdbvHnNmoRjvwPfe3SirNbDNH0Cc3ugJnYew/c1TLQ= + script: ./test/ci.sh + +after_success: + - make javadoc + - .utility/push-javadoc-to-gh-pages.sh \ No newline at end of file diff --git a/.utility/push-javadoc-to-gh-pages.sh b/.utility/push-javadoc-to-gh-pages.sh new file mode 100755 index 0000000000..c729898880 --- /dev/null +++ b/.utility/push-javadoc-to-gh-pages.sh @@ -0,0 +1,25 @@ +#!/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 + + echo -e "Start to publish lastest Javadoc to gh-pages...\n" + + 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 + + echo -e "Done magic with auto publishment to gh-pages.\n" + +fi diff --git a/makefile b/makefile index 5841128cdd..b3058f4dd2 100755 --- a/makefile +++ b/makefile @@ -1468,7 +1468,7 @@ tarball: .PHONY: javadoc javadoc: - javadoc -sourcepath classpath -d build/javadoc -subpackages avian:java \ + $(JAVA_HOME)/bin/javadoc -sourcepath classpath -d build/javadoc -subpackages avian:java \ -windowtitle "Avian v$(version) Class Library API" \ -doctitle "Avian v$(version) Class Library API" \ -header "Avian v$(version)" \