Fix data version extraction
Deploy HEOS panel / deploy (push) Successful in 28s

This commit is contained in:
franzz committed 2026-09-22 15:53:47 +02:00
1 parent 0c8672789d
commit c153b52641
4 files changed
+20 -2

No files matched your search

+9 -2
View File
@@ -109,9 +109,16 @@ APP_NAME = "Heos"
# The deployed commit, so the UI can tell when the Pi has moved on to a
# newer version and reload itself -- iOS otherwise resumes a suspended
# home-screen session without ever checking back with the server. Empty
# when git isn't available; app.js treats that as "nothing to compare".
# home-screen session without ever checking back with the server. The
# Gitea deploy stamps VERSION at checkout time and ships it (the deployed
# tree otherwise has no .git -- see .gitea/workflows/deploy.yml); a manual
# git-clone install has no VERSION file, so it falls back to asking git
# directly. Empty when neither is available; app.js treats that as
# "nothing to compare".
def _app_version() -> str:
version_file = Path(__file__).resolve().parent / "VERSION"
if version_file.exists():
return version_file.read_text().strip()
try:
result = subprocess.run(
["git", "rev-parse", "--short", "HEAD"],