Skip to content

Commit

Permalink
use git log to print version
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Sep 9, 2019
1 parent c38f3a2 commit 85f1291
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions freqtrade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

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
Expand Down

0 comments on commit 85f1291

Please sign in to comment.