Skip to content

Instantly share code, notes, and snippets.

@jeffwillette
Created December 30, 2018 10:25
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 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