Skip to content
Myr

publish

This file

Path

scripts/publish

28 lines · 721 bytes

Last changed by

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

History of this file

Take 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 116fi1718find ${PACKAGE} -type f -name "*.py[co]" -delete19find ${PACKAGE} -type d -name __pycache__ -delete2021${PREFIX}python setup.py sdist22${PREFIX}twine upload dist/*2324echo "You probably want to also tag the version now:"25echo "git tag -a ${VERSION} -m 'version ${VERSION}'"26echo "git push --tags"2728scripts/clean