diff --git a/Dockerfile b/Dockerfile index ed23e5b..09119ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 . diff --git a/VERSION b/VERSION index 9d7e3b3..631073f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.45.8 +0.45.9 diff --git a/app/config.py b/app/config.py index 5ec94f8..3bd3090 100644 --- a/app/config.py +++ b/app/config.py @@ -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: