fix(release): APP_VERSION lit le fichier VERSION (source unique) + COPY dans l'image
CI / test (push) Successful in 2m7s

La constante app/config.py était incrémentée à la main et oubliaée aux
releases (0.45.7 vs VERSION=0.45.8) — le deploy auto croyait échouer et
notifiait en boucle. VERSION (bumpé par la release) est désormais lue au
démarrage, dans l'image comme sur l'hôte.
This commit is contained in:
bruno
2026-11-04 18:37:32 -05:00
parent 9bd3472b3c
commit e9332d5043
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -10,6 +10,7 @@ ENV PYTHONUNBUFFERED=1 \
# first, copy app/ afterwards) the installed distribution was empty and
# the app only worked by accident of the working directory.
COPY pyproject.toml ./
COPY VERSION ./VERSION
COPY app/ ./app/
COPY static/ ./static/
RUN pip install --no-cache-dir .
+1 -1
View File
@@ -1 +1 @@
0.45.8
0.45.9
+2 -1
View File
@@ -181,7 +181,8 @@ from urllib.parse import urlparse
BASE_DIR = Path(__file__).resolve().parent.parent
APP_VERSION = "0.45.7"
_version_file = next((Path(p) for p in ("/VERSION", BASE_DIR / "VERSION") if Path(p).exists()), None)
APP_VERSION = _version_file.read_text().strip() if _version_file else "inconnue"
def _env_bool(name: str, default: bool) -> bool: