Add scripts/clean

This commit is contained in:
Tom Christie 2018-12-06 10:52:38 +00:00
parent 147c47deb1
commit 654a65b649
2 changed files with 14 additions and 1 deletions

11
scripts/clean Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh -e
if [ -d 'dist' ] ; then
rm -r dist
fi
if [ -d 'site' ] ; then
rm -r site
fi
if [ -d 'starlette.egg-info' ] ; then
rm -r starlette.egg-info
fi

View File

@ -6,6 +6,8 @@ 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'."
@ -23,4 +25,4 @@ echo "You probably want to also tag the version now:"
echo "git tag -a ${VERSION} -m 'version ${VERSION}'"
echo "git push --tags"
rm -r dist
scripts/clean