When tags are present 'git describe' reports the git hash with
a leading 'g' character, but when no tags are present it does
not. We want the format to be consistent, so we prepend it ourselves.
... | ... |
@@ -94,7 +94,8 @@ def get_version_from_git(): |
94 | 94 |
try: |
95 | 95 |
release, dev, git = description |
96 | 96 |
except ValueError: # No tags, only the git hash |
97 |
- git, = description |
|
97 |
+ # prepend 'g' to match with format returned by 'git describe' |
|
98 |
+ git = 'g{}'.format(*description) |
|
98 | 99 |
release = 'unknown' |
99 | 100 |
dev = None |
100 | 101 |
|