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
|
#!/bin/sh -ex
PROJECT="mkautodoc"
VERSION=`cat ${PROJECT}/__init__.py | grep __version__ | sed "s/__version__ = //" | sed "s/'//g"`
if [ -d 'venv' ] ; then
BIN_PATH="venv/bin/"
else
BIN_PATH=""
fi
if ! command -v "${BIN_PATH}twine" &>/dev/null ; then
echo "Unable to find the 'twine' command."
echo "Install from PyPI, using '${BIN_PATH}pip install twine'."
exit 1
fi
scripts/clean
${BIN_PATH}python setup.py sdist
${BIN_PATH}twine upload dist/*
# ${BIN_PATH}mkdocs gh-deploy
scripts/clean
echo "You probably want to also tag the version now:"
echo "git tag -a ${VERSION} -m 'version ${VERSION}'"
echo "git push --tags"
|