publish
This file
Path
scripts/publish
35 lines · 942 bytes
Last changed by
Build and upload universal wheels to PyPI (#439)Josep Cugatbefore adoption9e1cc26
History of this fileTake it
1#!/bin/sh -e23export PACKAGE="httpx"4export VERSION=`cat ${PACKAGE}/__version__.py | grep __version__ | sed "s/__version__ = //" | sed "s/'//g"`5export PREFIX=""6if [ -d 'venv' ] ; then7 export PREFIX="venv/bin/"8fi910scripts/clean1112if ! command -v "${PREFIX}twine" &>/dev/null ; then13 echo "Unable to find the 'twine' command."14 echo "Install from PyPI, using '${PREFIX}pip install twine'."15 exit 116fi1718if ! command -v "${PREFIX}mkdocs" &>/dev/null ; then19 echo "Unable to find the 'mkdocs' command."20 echo "Install from PyPI, using '${PREFIX}pip install mkdocs'."21 exit 122fi2324find ${PACKAGE} -type f -name "*.py[co]" -delete25find ${PACKAGE} -type d -name __pycache__ -delete2627${PREFIX}python setup.py sdist bdist_wheel28${PREFIX}twine upload dist/*29${PREFIX}mkdocs gh-deploy3031echo "You probably want to also tag the version now:"32echo "git tag -a ${VERSION} -m 'version ${VERSION}'"33echo "git push --tags"3435scripts/clean