Automatically generate and commit Javadoc.

This will only generate on pushes to master, and not pull requests.
This commit is contained in:
Ben Limmer 2013-11-20 17:02:33 -07:00
parent 2b68815636
commit 39214d860f
3 changed files with 34 additions and 1 deletions

View File

@ -1,2 +1,10 @@
language: cpp language: cpp
env:
global:
secure: NhmSoQSnkmcj5BgBtVTd1X5KIECmFHwss8hzDdNmEtbGe3sIBjZksx1RSP67y/bAhuG9l8rrc0V/yMvCJY8KnjirZE9bhcY8jY8Tl1nRuUbruT7QEoufhCi79+9U1KA62PdbvHnNmoRjvwPfe3SirNbDNH0Cc3ugJnYew/c1TLQ=
script: ./test/ci.sh script: ./test/ci.sh
after_success:
- make javadoc
- .utility/push-javadoc-to-gh-pages.sh

View File

@ -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

View File

@ -1468,7 +1468,7 @@ tarball:
.PHONY: javadoc .PHONY: javadoc
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" \ -windowtitle "Avian v$(version) Class Library API" \
-doctitle "Avian v$(version) Class Library API" \ -doctitle "Avian v$(version) Class Library API" \
-header "Avian v$(version)" \ -header "Avian v$(version)" \