diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b63161c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +# Shell-/Deploy-Skripte MÜSSEN LF behalten — sonst bricht der Deploy auf der Box +# (CRLF macht `set -euo pipefail` zu `pipefail\r` → "invalid option name"). +*.sh text eol=lf +*.bash text eol=lf + +# systemd-Units und Service-Configs ebenfalls LF. +*.service text eol=lf +*.timer text eol=lf + +# Windows-Batch-Wrapper bleiben CRLF. +*.cmd text eol=crlf +*.bat text eol=crlf diff --git a/backend/services/maintenance.py b/backend/services/maintenance.py index 359446f..eea19a3 100644 --- a/backend/services/maintenance.py +++ b/backend/services/maintenance.py @@ -42,7 +42,10 @@ def _installed_engine_build() -> int | None: out = subprocess.run([bin_path, "--version"], capture_output=True, text=True, timeout=20, env=env) txt = (out.stderr or "") + (out.stdout or "") - if (m := re.search(r"build:\s*\S+\s*\((\d+)\)", txt)) or (m := re.search(r"\bb(\d{3,})\b", txt)): + # Formate je nach Build: "version: 9821 (hash)" (aktuell), "build: (9821)", "b9821". + if (m := re.search(r"version:\s*(\d{3,})", txt)) \ + or (m := re.search(r"build:\s*\S+\s*\((\d+)\)", txt)) \ + or (m := re.search(r"\bb(\d{3,})\b", txt)): return int(m.group(1)) except Exception: return None