-
Notifications
You must be signed in to change notification settings - Fork 29
/
publish-doxygen
executable file
·42 lines (35 loc) · 1.18 KB
/
publish-doxygen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# leave the script if we build on travis-ci and this is not the clang++-3.7 build
if [[ $BUILD_ON_TRAVIS ]] && [[ "$COMPILER" != "$BUILD_DOXYGEN_COMPILE" ]]; then
exit
fi
if [[ $BUILD_ON_TRAVIS ]]; then
git clone https://github.com/doxygen/doxygen.git
cd doxygen
mkdir build
cd build
cmake -G "Unix Makefiles" ..
make
cd ..
fi
# see for the idea behin this script http://blog.gockelhut.com/2014/09/automatic-documentation-publishing-with.html
[email protected]:TorstenRobitzki/bluetoe.git
HTML_PATH=documentation/html
COMMIT_USER="Documentation Builder"
COMMIT_EMAIL="[email protected]"
CHANGESET=$(git rev-parse --verify HEAD)
ROOT="$PWD"
# code github pages
rm -rf ${HTML_PATH}
mkdir -p ${HTML_PATH}
git clone -b gh-pages "${REPO_PATH}" --single-branch ${HTML_PATH}
# remove old content
cd ${HTML_PATH} && git rm -rf .
# generate new documentation
cd "$ROOT" && doxygen 1> /dev/null
# commit new documentation
cd ${HTML_PATH} \
&& git add . \
&& git config user.name "${COMMIT_USER}" \
&& git config user.email "${COMMIT_EMAIL}" \
&& git commit -m "Automated documentation build for changeset ${CHANGESET}." \
&& git push origin gh-pages