Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Commit

Permalink
Work on auto generating javadoc for gwtbootstrap3-extras.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjardine committed Feb 24, 2016
1 parent 05fe15e commit 095e70c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ script:
- mvn clean install -DdryRun=true -Dlicense.failOnMissingHeader=true -Dlicense.failOnNotUptodateHeader=true
after_success:
- .utility/deploy.sh
- .utility/update_demo_site.sh
- .utility/update_site_apidocs.sh
- .utility/update_site_demo.sh
35 changes: 35 additions & 0 deletions .utility/update_site_apidocs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
set -ev
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then

if [[ -z "$GH_TOKEN" ]]; then
echo -e "GH_TOKEN is not set"
exit 1
fi

echo -e "Publishing javadoc to gh-pages . . .\n"

cp -R ./gwtbootstrap3-extras/target/javadoc $HOME/javadoc-latest

git config --global user.email "[email protected]"
git config --global user.name "travis-ci"

# clone the gh-pages branch.
cd $HOME
rm -rf gh-pages
git clone --quiet --branch=gh-pages https://$GH_TOKEN@github.com/gwtbootstrap3/gwtbootstrap3-demo gh-pages > /dev/null
cd gh-pages

# remove the javadoc directories from git.
git rm -rf ./snapshot/extras-apidocs

# copy the new javadoc to snapshot dir.
cp -Rf $HOME/javadoc-latest ./snapshot/extras-apidocs

git add -f .
git commit -m "Auto-push javadoc to gh-pages successful. (Travis build: $TRAVIS_BUILD_NUMBER)"
git push -fq origin gh-pages > /dev/null

echo -e "Published javadoc to gh-pages.\n"

fi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -ev
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then

if [[ -z "$GH_TOKEN" ]]; then
if [ -z "$GH_TOKEN" ]; then
echo -e "GH_TOKEN is not set"
exit 1
fi
Expand Down

0 comments on commit 095e70c

Please sign in to comment.