4 build="$PWD/website-build"
5 usage="Builds eventlet.net website static pages into ${build}.
6 Requires sphinx-build, git and Github account.
8 --no-commit Just build HTML, skip any git operations."
24 if ! which sphinx-build >/dev/null; then
25 echo "sphinx-build not found. Possible solution: pip install sphinx" >&2
26 echo "Links: http://sphinx-doc.org/" >&2
30 if [ $commit -eq 1 ] && ! git status >/dev/null; then
31 echo "git not found. git and Github account are required to update online documentation." >&2
32 echo "Links: http://git-scm.com/ https://github.com/" >&2
40 echo "2. build static pages"
41 cp doc/real_index.html "$build/index.html"
42 cp NEWS doc/changelog.rst
44 # -b html -- builder, output mode
45 # -d dir -- path to doctrees cache
46 # -n -- nit-picky mode (kind of -Wall for gcc)
47 # -W -- turns warnings into errors
48 # -q -- quiet, emit only warnings and errors
49 sphinx-build -b html -d "$build/tmp" -n -q "doc" "$build/doc"
51 rm -f "$build/doc/.buildinfo"
52 rm -f "doc/changelog.rst"
54 if [ $commit -eq 1 ]; then
55 echo "3. Updating git branch gh-pages"
56 source_name=`git describe --dirty --tags`
57 git branch --track gh-pages origin/gh-pages || true
59 git ls-files |grep -Ev '^.gitignore$' |xargs rm -f
64 echo "eventlet.net" >"CNAME"
71 read -p "Carefully read git status output above, press Enter to continue or Ctrl+C to abort"
72 git commit --edit -m "Website built from $source_name"