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