summaryrefslogtreecommitdiff
path: root/regen-docs
blob: c08709dadd3901379166d2aca113d6207cc60868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

CMD="$1"
if [ "$CMD" = "release" ] ; then
  python -c 'import setuptools; __file__="setup.py"; execfile(__file__)' register sdist upload
  CMD="publish"
fi

mkdir -p docs/_static docs/_build
sphinx-build -E -b html docs/ docs/_build || exit 1
if [ "$CMD" = "publish" ] ; then
  cd docs/_build
  echo "Uploading files..."
  tar czvf - . | ssh flow.openplans.org 'ssh acura.openplans.org "cd /www/pip.openplans.org/htdocs/; tar xzvf -"'
fi