Last active
September 15, 2016 00:21
-
-
Save ericoporto/6fabddba08c8d50eb554494ff4c1abd0 to your computer and use it in GitHub Desktop.
Use `tagandpypi.sh 'tag message'` to create a tag for current version and send the result to pypi (uses Twine to preven MITM)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MESSAGE=$1 | |
VERSION=`grep __version__ */__init__.py | cut -d= -f2 | tr -d '[[:space:]]'` | |
git tag $VERSION -m $MESSAGE | |
git push --tags origin master | |
python3 setup.py sdist | |
LATESTDIST=`ls -td dist/* | head -1` | |
twine register $LATESTDIST | |
twine upload dist/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment