@@ -0,0 +1,15 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user