-
Notifications
You must be signed in to change notification settings - Fork 5
/
sphinx.cfg
168 lines (135 loc) · 4.63 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[buildout]
sphinx-parts =
sphinx
docs-build-script-public
docs-build-and-publish-script-public
docs-build-script-public-fr
docs-build-and-publish-script-public-fr
docs-build-script-intern
docs-build-and-publish-script-intern
[sphinx]
recipe = zc.recipe.egg
eggs =
Sphinx
Jinja2
sphinxcontrib-httpdomain
[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
if [ -z $CI ]; then CI='false'; 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 [[ $CI != "true" ]]; then
${buildout:bin-directory}/enable-lfs --warn-only
fi
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
export SPHINX_PUBLICATION_LEVEL="published"
bin/docs-build-public dirhtml
rsync -O --chmod=ug+rw,Dg+s -v -a --delete docs/public/_build/dirhtml/* web06p.4teamwork.ch:/var/www/docs.onegovgever.ch/
output = ${buildout:bin-directory}/docs-build-and-publish-public
mode = 755
[docs-build-script-public-fr]
recipe = collective.recipe.template
inline =
#!/bin/bash
#
# Usage:
# bin/docs-build-public-fr [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
if [ -z $CI ]; then CI='false'; 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-fr' docs...\n"
if [[ $CI != "true" ]]; then
${buildout:bin-directory}/enable-lfs --warn-only
fi
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-fr
make clean
make -e $FORMAT
output = ${buildout:bin-directory}/docs-build-public-fr
mode = 755
[docs-build-and-publish-script-public-fr]
recipe = collective.recipe.template
inline =
#!/bin/bash
export SPHINX_PUBLICATION_LEVEL="published"
bin/docs-build-public-fr dirhtml
rsync -O --chmod=ug+rw,Dg+s -v -a --delete docs/public-fr/_build/dirhtml/* web06p.4teamwork.ch:/var/www/docs-fr.onegovgever.ch/
output = ${buildout:bin-directory}/docs-build-and-publish-public-fr
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
if [ -z $CI ]; then CI='false'; fi
set -euo pipefail
BUILDOUT_DIR="${buildout:directory}"
export SPHINXBUILD="${buildout:bin-directory}/sphinx-build"
echo -e "Building 'intern' docs...\n"
if [[ $CI != "true" ]]; then
${buildout:bin-directory}/enable-lfs --warn-only
fi
# 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
export SPHINX_PUBLICATION_LEVEL="published"
bin/docs-build-intern dirhtml
rsync -O --chmod=ug+rw,Dg+s -v -a --delete docs/intern/_build/dirhtml/* web06p.4teamwork.ch:/var/www/intern.onegovgever.ch/
output = ${buildout:bin-directory}/docs-build-and-publish-intern
mode = 755