mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
have version-detection fall back to freqtrade_commit
this allows freqtrade --version to work in docker too. sample command: `docker-compose run --rm freqtrade -version`
This commit is contained in:
parent
18a6c98a82
commit
952d2f7513
|
@ -24,4 +24,11 @@ if __version__ == 'develop':
|
|||
# stderr=subprocess.DEVNULL).decode("utf-8").rstrip().strip('"')
|
||||
except Exception:
|
||||
# git not available, ignore
|
||||
pass
|
||||
try:
|
||||
# Try Fallback to freqtrade_commit file (created by CI whild building docker image)
|
||||
from pathlib import Path
|
||||
versionfile = Path('./freqtrade_commit')
|
||||
if versionfile.is_file():
|
||||
__version__ = f"docker-{versionfile.read_text()[:8]}"
|
||||
except Exception:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue
Block a user