hw: version: use 8 characters for git revision

By deafult, git only shows 7 characters.  Increase this to 8.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-11-28 16:33:49 +08:00
parent b087089960
commit d10fdd580f

View File

@ -37,7 +37,7 @@ class Version(Module, AutoCSR, AutoDoc):
if len(version) >= 1:
major = makeint(version[0])
return (major, minor, rev)
git_rev_cmd = subprocess.Popen(["git", "describe", "--tags", "--long", "--dirty=+"],
git_rev_cmd = subprocess.Popen(["git", "describe", "--tags", "--long", "--dirty=+", "--abbrev=8"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
(git_stdout, _) = git_rev_cmd.communicate()