Skip to content

Instantly share code, notes, and snippets.

@codeinthehole
Created January 19, 2012 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeinthehole/1641354 to your computer and use it in GitHub Desktop.
Save codeinthehole/1641354 to your computer and use it in GitHub Desktop.
Simple script for releasing python packages to PyPi
#!/bin/bash
# Extract version number from setup.py
RELEASE_NUM=`grep version setup.py | cut -d\' -f2`
# Push to PyPi
python setup.py sdist upload
# Tag in Git and push to remote
git tag $RELEASE_NUM -m "Tagging release $RELEASE_NUM"
git push --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment