fix: version Docker — générer VERSION file depuis .git/HEAD au build
CI / lint (push) Failing after 9s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 17s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled

- Dockerfile: COPY .git/HEAD + .git/refs/ → génère backend/VERSION avec hash
- version.py: fallback lit backend/VERSION (à côté du module, pas racine repo)
- Format: 1.8.0-0-g<8-char-hash> ou 1.8.0-dev si indisponible
This commit is contained in:
2026-07-27 17:17:47 -04:00
parent c8b19d507a
commit a80df670be
2 changed files with 18 additions and 2 deletions
+2 -2
View File
@@ -37,8 +37,8 @@ def get_version() -> str:
except (FileNotFoundError, subprocess.TimeoutExpired, OSError):
pass
# Fallback: try reading from a VERSION file
version_file = _ROOT / "VERSION"
# Fallback: try reading from a VERSION file next to this module
version_file = Path(__file__).parent / "VERSION"
if version_file.exists():
return version_file.read_text().strip()