Skip to content

Commit

Permalink
if there are no tags, continue with commit and use revision no 0
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 31, 2021
1 parent b34da7e commit 32e3820
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions fs/bin/add_build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,16 @@ def get_vcs_props():
out = out.decode('utf-8').splitlines()[0]
#ie: out=v4.0.6-58-g6e6614571
parts = out.split("-")
if len(parts)<3:
if len(parts)==1:
commit = parts[0]
print("could not get revision number - no tags?")
rev_str = "0"
elif len(parts)==3:
rev_str = parts[1]
commit = parts[2]
else:
print("could not parse version information from string: %s" % out)
return props
rev_str = parts[1]
commit = parts[2]
props["COMMIT"] = commit
try:
rev = int(rev_str)
Expand Down

0 comments on commit 32e3820

Please sign in to comment.