-
Notifications
You must be signed in to change notification settings - Fork 170
/
build-docs.sh
executable file
·50 lines (41 loc) · 863 Bytes
/
build-docs.sh
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
#!/usr/bin/env bash
set -e
get_pythonpath () {
export PYTHONPATH="`python -c "import sys; print(':'.join([s for s in sys.path if len(s) > 0]))"`:."
}
servedocs () {
get_pythonpath
mkdocs serve
}
ghpages () {
get_pythonpath
mkdocs gh-deploy
}
builddocs () {
get_pythonpath
mkdocs build
}
cleandocs () {
if [ -f "docs/.beam-query-cache" ]; then
rm -rf docs/.beam-query-cache
fi
}
usage () {
echo "build-docs: Build beam docs"
echo "Usage: build-docs <command>"
echo
echo "Where <command> is one of"
echo " builddocs - build docs in site/ directory"
echo " ghpages - build ghpages branch"
echo " servedocs - serve documents on 8000"
}
case $1 in
clean) cleandocs ;;
servedocs)
servedocs ;;
builddocs)
builddocs ;;
ghpages)
ghpages ;;
*) usage ;;
esac