From 542ff86a43aba87a2db052392275f4c505c692d6 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 26 Feb 2026 14:39:47 -0800 Subject: [PATCH] feat: show version tag in sidebar footer --- app/app.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/app.py b/app/app.py index b30c6a1..2eac2a9 100644 --- a/app/app.py +++ b/app/app.py @@ -8,6 +8,7 @@ Run: streamlit run app/app.py bash scripts/manage-ui.sh start """ import logging +import subprocess import sys from pathlib import Path @@ -138,7 +139,20 @@ def _task_indicator(): detail = f" · {stage}" if stage else (f" — {t.get('company')}" if t.get("company") else "") st.caption(f"{icon} {label}{detail}") +@st.cache_resource +def _get_version() -> str: + try: + return subprocess.check_output( + ["git", "describe", "--tags", "--always"], + cwd=Path(__file__).parent.parent, + text=True, + ).strip() + except Exception: + return "dev" + with st.sidebar: _task_indicator() + st.divider() + st.caption(f"Peregrine {_get_version()}") pg.run()