use git log to print version
This commit is contained in:
parent
c38f3a2b9a
commit
85f1291597
@ -5,8 +5,9 @@ if __version__ == 'develop':
|
||||
|
||||
try:
|
||||
import subprocess
|
||||
__version__ = str(subprocess.check_output(
|
||||
["git", "describe"], stderr=subprocess.DEVNULL).rstrip())
|
||||
__version__ = 'develop-' + subprocess.check_output(
|
||||
['git', 'log', '--format="%h"', '-n 1'],
|
||||
stderr=subprocess.DEVNULL).decode("utf-8").rstrip().strip('"')
|
||||
except Exception:
|
||||
# git not available, ignore
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user