Skip to content

Instantly share code, notes, and snippets.

@jeffwillette
Created December 30, 2018 10:25
Show Gist options
  • Save jeffwillette/02c021e10c1fc4c5e282e5624917854e to your computer and use it in GitHub Desktop.
Save jeffwillette/02c021e10c1fc4c5e282e5624917854e to your computer and use it in GitHub Desktop.
increment version number with python
import sys
version = sys.argv[1]
front = ".".join(version.split(".")[:-1])
last = int(version.split(".")[-1]) + 1
print(front + "." + str(last))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment