httpx/scripts/publish
Tom Christie c9747aa357
http3 (#86)
* Start fleshing out documentation

* Docs work

* http3

* Update docs

* Include lowercase status codes, for requests compat

* Updating docs

* Docs tweaks
2019-06-12 15:02:16 +01:00

29 lines
718 B
Bash
Executable File

#!/bin/sh -e
export PACKAGE="http3"
export VERSION=`cat ${PACKAGE}/__init__.py | grep __version__ | sed "s/__version__ = //" | sed "s/'//g"`
export PREFIX=""
if [ -d 'venv' ] ; then
export PREFIX="venv/bin/"
fi
scripts/clean
if ! command -v "${PREFIX}twine" &>/dev/null ; then
echo "Unable to find the 'twine' command."
echo "Install from PyPI, using '${PREFIX}pip install twine'."
exit 1
fi
find ${PACKAGE} -type f -name "*.py[co]" -delete
find ${PACKAGE} -type d -name __pycache__ -delete
${PREFIX}python setup.py sdist
${PREFIX}twine upload dist/*
echo "You probably want to also tag the version now:"
echo "git tag -a ${VERSION} -m 'version ${VERSION}'"
echo "git push --tags"
scripts/clean