mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 10:56:48 +00:00
21 lines
387 B
Python
21 lines
387 B
Python
from functools import lru_cache
|
|
from pathlib import Path
|
|
|
|
root = Path(__file__).parent.parent
|
|
|
|
|
|
@lru_cache()
|
|
def get_build_number():
|
|
try:
|
|
return (root / "BUILD").read_text().strip()
|
|
except FileNotFoundError:
|
|
return ""
|
|
|
|
|
|
@lru_cache()
|
|
def get_version():
|
|
try:
|
|
return (root / "VERSION").read_text().strip()
|
|
except FileNotFoundError:
|
|
return ""
|