16 lines
304 B
Python
16 lines
304 B
Python
import os
|
|
from pathlib import Path
|
|
|
|
VERSION_FILE = Path(__file__).parent.parent / "version.txt"
|
|
|
|
|
|
def read_version() -> str:
|
|
try:
|
|
return VERSION_FILE.read_text().strip()
|
|
except (FileNotFoundError, OSError):
|
|
return "0.0.1"
|
|
|
|
|
|
def get_app_version() -> str:
|
|
return read_version()
|