-
Notifications
You must be signed in to change notification settings - Fork 8
/
gitmakedoc
executable file
·49 lines (40 loc) · 1003 Bytes
/
gitmakedoc
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
43
44
45
46
47
48
49
#!/bin/sh
# Create Doxygen documentation and (if on "master" branch) push to git server.
# Prepare your working copy for pushing the documentation to Github:
#
# cd doc
# git clone [email protected]:AudioProcessingFramework/audioprocessingframework.github.io.git html
set -e
VERSION=$(git describe)
BRANCH=$(git symbolic-ref --short HEAD)
cd doc
if [ -d html ]
then
cd html
if [ -d .git -a "$BRANCH" = master ]
then
git rm -rf --ignore-unmatch .
fi
cd ..
fi
( cat Doxyfile \
; echo PROJECT_NUMBER = \"version $VERSION\"\
; echo OUTPUT_DIRECTORY = . \
; echo QUIET = YES \
; echo WARNINGS = NO \
; echo GENERATE_LATEX = NO \
; echo GENERATE_RTF = NO \
; echo GENERATE_MAN = NO \
; echo GENERATE_XML = NO \
) | doxygen - > /dev/null
cd html
if [ -d .git -a "$BRANCH" = master ]
then
echo -n "Push to Github? [yN] "
read ANSWER
if [ "$ANSWER" = Y -o "$ANSWER" = y ]
then
git add . && git commit -m "Doxygen documentation for $VERSION" \
&& git push --force
fi
fi