Skip to content

Instantly share code, notes, and snippets.

@JohannesBuchner
Created September 20, 2013 17:00
Show Gist options
  • Save JohannesBuchner/6640570 to your computer and use it in GitHub Desktop.
Save JohannesBuchner/6640570 to your computer and use it in GitHub Desktop.
tool for publishing sphinx documentation on github and releasing packages on PyPI
#!/bin/bash
# Author: Johannes Buchner (C) 2013
# tool for publishing sphinx documentation on github
# and releasing packages on PyPI
case "$1" in
doc)
# see https://help.github.com/articles/creating-project-pages-manually
make -C doc/ html &&
git checkout gh-pages &&
cp -r doc/_build/html/* . &&
git add *.html &&
git commit -av &&
git checkout master
;;
push)
git push origin gh-pages &&
git push origin master
;;
release)
# see http://docs.python.org/2/distutils/packageindex.html
rm -rv build/ dist/
python setup.py clean build install --user sdist upload --sign
;;
*)
echo "unknown command '$1'"
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment