Skip to content

Instantly share code, notes, and snippets.

@deeuu
Last active December 9, 2019 14:03
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 deeuu/ef23129e5d210609de85e8a625f57592 to your computer and use it in GitHub Desktop.
Save deeuu/ef23129e5d210609de85e8a625f57592 to your computer and use it in GitHub Desktop.
Xonsh script for tagging (and pushing the tag) the version of a python package as recorded in __version__.py
about = {}
with open($(find . -d 2 -name '__version__.py').strip()) as f:
exec(f.read(), about)
tag_version = f"v{about['__version__']}"
git tag @(tag_version)
git push origin @(tag_version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment