Skip to content
Myr

Add scripts/publish

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by Tom Christie · parent a75bc0e · Browse files · 1 file+28 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+28 added−0 removed

  • other:+28 added−0 removed

1 file+28 added−0 removed

added:scripts/publish+28 added
1#!/bin/sh -e23export PACKAGE="httpcore"4export VERSION=`cat ${PACKAGE}/__init__.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