Skip to content

Commit

Permalink
better ver-bump.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midnightercz committed Sep 22, 2016
1 parent f46fe76 commit 4ec2bc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ver-bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@
try:
if sys.argv[1] == "major":
version["libcomps_VERSION_MAJOR"] += 1
version["libcomps_VERSION_MINOR"] = 1
version["libcomps_VERSION_PATCH"] = 1
version["libcomps_RELEASE"] = 1
elif sys.argv[1] == "minor":
version["libcomps_VERSION_MINOR"] += 1
version["libcomps_VERSION_PATCH"] = 1
version["libcomps_RELEASE"] = 1
elif sys.argv[1] == "patch":
version["libcomps_VERSION_PATCH"] += 1
version["libcomps_RELEASE"] = 1
except IndexError:
version["libcomps_VERSION_PATCH"] += 1
version["libcomps_RELEASE"] = 1

f = open("version.json", "w")
json.dump(version, f, indent=4)
Expand Down

0 comments on commit 4ec2bc1

Please sign in to comment.