xref: /OpenGrok/dev/javadoc.sh (revision 17ce305ceadbf910560f549bd681e9da4b6c600d)
1*17ce305cSVladimir Kotal#!/bin/bash
2*17ce305cSVladimir Kotal
3*17ce305cSVladimir Kotalset -e
4*17ce305cSVladimir Kotal
5*17ce305cSVladimir Kotalmvn -DskipTests=true site
6*17ce305cSVladimir Kotal
7*17ce305cSVladimir Kotalgit config --global user.email "travis@travis-ci.org"
8*17ce305cSVladimir Kotalgit config --global user.name "travis-ci"
9*17ce305cSVladimir Kotalgit clone --quiet --branch=gh-pages \
10*17ce305cSVladimir Kotal    https://${GH_PAGES_TOKEN}@github.com/opengrok/opengrok gh-pages
11*17ce305cSVladimir Kotal
12*17ce305cSVladimir Kotalcd gh-pages
13*17ce305cSVladimir Kotalif [[ -d ./javadoc ]]; then
14*17ce305cSVladimir Kotal	git rm -rf ./javadoc
15*17ce305cSVladimir Kotalfi
16*17ce305cSVladimir Kotalcp -Rf ${TRAVIS_BUILD_DIR}/target/site/apidocs ./javadoc
17*17ce305cSVladimir Kotalgit add -f ./javadoc
18*17ce305cSVladimir Kotalgit commit -m "Lastest javadoc auto-pushed to gh-pages"
19*17ce305cSVladimir Kotalgit push -fq origin gh-pages
20