feat: version dynamique via fichier VERSION

- Fichier VERSION à la racine (4.0.3)
- _get_app_version() avec cache dans dashboard.py
  - Lecture depuis VERSION (dev) ou /app/VERSION (Docker)
  - Fallback '0.0.0' si fichier absent
- board.py: import _get_app_version depuis dashboard
- Les deux _sidebar_data() remplacent '4.0.3' par _get_app_version()
- Déploiement: changer VERSION → mettre à jour sans toucher le code
- 143 tests passent
This commit is contained in:
2026-07-21 07:58:24 -04:00
parent d94dd3da99
commit 9e45ea8870
3 changed files with 30 additions and 2 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ from fastapi.responses import HTMLResponse, JSONResponse
from app.db import get_conn
from app.services.gitea_client import gitea
from app.auth.session import SessionManager
from app.routers.dashboard import _get_app_version
logger = logging.getLogger(__name__)
router = APIRouter(tags=["board"], prefix="/board")
@@ -397,7 +398,7 @@ def _sidebar_data(request: Request, owner: str = "", repo: str = "") -> dict:
"gitea_linked": gitea_linked,
"github_linked": github_linked,
"has_active_workspace": has_active_workspace,
"app_version": "4.0.3",
"app_version": _get_app_version(),
"local_workspaces": _local_workspaces_for_user(user)}