forked from 4teamwork/opengever.core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sphinx.cfg
101 lines (81 loc) · 2.58 KB
/
sphinx.cfg
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[buildout]
sphinx-parts =
sphinx
docs-build-script-public
docs-build-and-publish-script-public
docs-build-script-intern
docs-build-and-publish-script-intern
[sphinx]
recipe = zc.recipe.egg
eggs =
Sphinx
Jinja2
sphinxcontrib-httpdomain
sphinxcontrib-disqus
[docs-build-script-public]
recipe = collective.recipe.template
inline =
#!/bin/bash
#
# Usage:
# bin/docs-build-public [format]
#
# If [format] is specified, it will be passed to `make` as the target,
# otherwise defaults to 'html'.
if [ -z $1 ]; then FORMAT='html'; else FORMAT=$1; fi
set -euo pipefail
# XXX: Hardcoded 'zopepy' in order to avoid dependency on
# the [zopypy] section for sphinx-standalone.cfg.
ZOPE_PY="${buildout:bin-directory}/zopepy"
BUILDOUT_DIR="${buildout:directory}"
export SPHINXBUILD="${buildout:bin-directory}/sphinx-build"
echo -e "Building 'public' docs...\n"
if [ -f $ZOPE_PY ]; then
# Update ReStructuredText .inc files based on JSON schema dumps
$ZOPE_PY scripts/update-schema-docs.py $BUILDOUT_DIR
else
echo "Skipping schema docs update (no full GEVER dev-environment present)"
fi
# Build the Sphinx documentation
cd docs/public
make clean
make -e $FORMAT
output = ${buildout:bin-directory}/docs-build-public
mode = 755
[docs-build-and-publish-script-public]
recipe = collective.recipe.template
inline =
#!/bin/bash
bin/docs-build-public dirhtml
rsync -v -a docs/public/_build/dirhtml/* [email protected]:/var/www/docs.onegovgever.ch/
output = ${buildout:bin-directory}/docs-build-and-publish-public
mode = 755
[docs-build-script-intern]
recipe = collective.recipe.template
inline =
#!/bin/bash
#
# Usage:
# bin/docs-build-intern [format]
#
# If [format] is specified, it will be passed to `make` as the target,
# otherwise defaults to 'html'.
if [ -z $1 ]; then FORMAT='html'; else FORMAT=$1; fi
set -euo pipefail
BUILDOUT_DIR="${buildout:directory}"
export SPHINXBUILD="${buildout:bin-directory}/sphinx-build"
echo -e "Building 'intern' docs...\n"
# Build the Sphinx documentation
cd docs/intern
make clean
make -e $FORMAT
output = ${buildout:bin-directory}/docs-build-intern
mode = 755
[docs-build-and-publish-script-intern]
recipe = collective.recipe.template
inline =
#!/bin/bash
bin/docs-build-intern dirhtml
rsync -v -a docs/intern/_build/dirhtml/* [email protected]:/var/www/intern.onegovgever.ch/
output = ${buildout:bin-directory}/docs-build-and-publish-intern
mode = 755