Skip to content

Commit

Permalink
Merge pull request #359 from WadeBarnes/master
Browse files Browse the repository at this point in the history
Upgrade semver
  • Loading branch information
WadeBarnes authored Feb 21, 2024
2 parents db09135 + 942a171 commit 356b34c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions updateVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
sovrinMetadata = 'sovrin/metadata.json'

def updateWithTag(ver):
if not semver.VersionInfo.isvalid(ver):
if not semver.Version.is_valid(ver):
raise ValueError('No Valid Semver in Tag')
return ver

def updateWithTimestamp(timestamp):
version = "str"
with open(sovrinMetadata, 'r') as f:
data = json.load(f)
v = semver.VersionInfo.parse(data["version"])
v = semver.Version.parse(data["version"])
v = v.replace(prerelease="dev" + timestamp)
version = str(v)
return version
Expand All @@ -31,7 +31,7 @@ def updateWithTimestamp(timestamp):
if args['getVersion']:
with open(sovrinMetadata, 'r') as f:
data = json.load(f)
v = semver.VersionInfo.parse(data["version"])
v = semver.Version.parse(data["version"])
print(v)
quit()

Expand Down

0 comments on commit 356b34c

Please sign in to comment.