feat(version): version x.y.z propre et cohérente partout + bump script
CI / lint (push) Failing after 21s
CI / test (push) Skipped
CI / build (push) Skipped
CI / e2e (push) Skipped
CI / security (push) Successful in 27s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Failing after 21s
CI / test (push) Skipped
CI / build (push) Skipped
CI / e2e (push) Skipped
CI / security (push) Successful in 27s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
Corrige l'incoherence d'affichage (page principale 0.0.0-dev vs a propos v2.0.0-dev) et unifie la gestion de version sur une seule source de verite. Backend: - version.py: get_version() retourne toujours le tag x.y.z propre du dernier tag (plus de 0.0.0-dev / -N-gHASH dans l'UI). Ajout get_git_describe() et get_git_commit() pour le detail. - main.py: /api/health expose git_describe + git_commit (nouveaux champs). Frontend: - modale A propos (populateAbout): version + commit lus depuis /api/health, suppression du hardcode v2.0.0-dev dans index.html. - section config A propos (loadAbout): lit health.version, plus de state. APP_VERSION obsolete. - badge header: fetch /api/health (fallback neutre '...'). - state.js: suppression de APP_VERSION (1.5.0) devenu mort; imports nettoyes. Script: - scripts/bump_version.sh: incrementation SemVer selon les commits (breaking->major, feat->minor, sinon patch), creer/pousser le tag vX.Y.Z. Tests: 507 passed, frontend validators OK.
This commit is contained in:
+6
-2
@@ -287,9 +287,11 @@ class ReloadResponse(BaseModel):
|
||||
class HealthResponse(BaseModel):
|
||||
"""Application health status."""
|
||||
status: str = Field(description="Health status ('ok' or 'error')")
|
||||
version: str = Field(description="Application version")
|
||||
version: str = Field(description="Application version (x.y.z — latest release tag)")
|
||||
vaults: int = Field(description="Number of configured vaults")
|
||||
total_files: int = Field(description="Total indexed files across all vaults")
|
||||
git_describe: str = Field(default="", description="Full git describe string (commits beyond tag), empty if no git")
|
||||
git_commit: str = Field(default="", description="Short HEAD commit hash, empty if no git")
|
||||
|
||||
|
||||
class DirectoryCreateRequest(BaseModel):
|
||||
@@ -645,7 +647,7 @@ async def lifespan(app: FastAPI):
|
||||
_search_executor = None
|
||||
|
||||
|
||||
from backend.version import get_version
|
||||
from backend.version import get_version, get_git_describe, get_git_commit
|
||||
|
||||
app = FastAPI(title="ObsiGate", version=get_version(), lifespan=lifespan)
|
||||
|
||||
@@ -1029,6 +1031,8 @@ async def api_health():
|
||||
"version": app.version,
|
||||
"vaults": len(index),
|
||||
"total_files": total_files,
|
||||
"git_describe": get_git_describe(),
|
||||
"git_commit": get_git_commit(),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user