release 1.13.2: sticky version link to commit (no Forgejo tag 404)

Version badge href uses src/commit/<sha> for the exact run tree instead of
src/tag/vX.Y.Z, which 404s when the tag is not yet on the remote.
This commit is contained in:
Hernâni Marques 2026-07-19 02:40:36 +02:00
parent 1f1277b36a
commit aa854b034a
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
5 changed files with 20 additions and 5 deletions

View file

@ -1 +1 @@
1.13.1
1.13.2

View file

@ -17,6 +17,7 @@ Git tags: `vMAJOR.FEATURE.FIX` (e.g. `v1.8.0`). File `VERSION` omits the `v` pre
| Tag | Date (UTC) | Notes |
|-----|------------|--------|
| **v1.13.2** | 2026-07-19 | **Bugfix:** sticky version link uses **commit** URL (`/src/commit/<sha>`) not `/src/tag/v…` (tags not yet pushed → Forgejo fat 404); tags v1.11v1.13.1 pushed to origin. |
| **v1.13.1** | 2026-07-19 | **Bugfix:** progress bar **global** done/total — phase `summary()` no longer snaps total to phase-local N (fixes 34/34 then 38/47); final `progress_finish` snaps once; header shows 0/N. |
| **v1.13.0** | 2026-07-19 | **Feature:** phase **devtesting** / **franken** — fake-franken CHF via `rusty.taler-ops.ch` (`taler-devtesting` geniban + fake-incoming); stage host-agent can include it. |
| **v1.12.0** | 2026-07-19 | **Feature:** collapsible **monitoring env context** (agent header: env_file, suite pin, domain/hosts/flags) — `<details>` default closed; summary shows agent · domain · suite. |

View file

@ -118,9 +118,14 @@ if [ -z "$SUITE_VERSION" ] && [ -f "${ROOT:-$AGENT_MON}/VERSION" ]; then
fi
[ -z "$SUITE_VERSION" ] && SUITE_VERSION="unknown"
case "$SUITE_VERSION" in unknown|v*) ;; *) SUITE_VERSION="v$SUITE_VERSION" ;; esac
if [ -z "$SUITE_VERSION_URL" ] && [ "$SUITE_VERSION" != "unknown" ]; then
# Prefer commit URL over /src/tag/… (tags lag push → sticky version 404 on Forgejo).
if [ -z "$SUITE_VERSION_URL" ]; then
_web="${SOURCE_REPO_WEB:-https://git.hacktivism.ch/hernani/taler-monitoring}"
SUITE_VERSION_URL="${_web}/src/tag/${SUITE_VERSION}"
if [ -n "${COMMIT:-}" ] && [ "$COMMIT" != "unknown" ]; then
SUITE_VERSION_URL="${_web}/src/commit/${COMMIT}"
elif [ "$SUITE_VERSION" != "unknown" ]; then
SUITE_VERSION_URL="${_web}/src/tag/${SUITE_VERSION}"
fi
fi
export SUITE_VERSION SUITE_VERSION_URL

View file

@ -101,8 +101,13 @@ case "$SUITE_VERSION" in
unknown|v*) ;;
*) SUITE_VERSION="v${SUITE_VERSION}" ;;
esac
# Sticky version badge: prefer commit URL (exact tree of this run).
# Tag URLs (/src/tag/vX.Y.Z) 404 when the tag is not yet pushed to Forgejo;
# commit URLs work as soon as main (or the tree) is on the remote.
SUITE_VERSION_URL=""
if [ -n "$SOURCE_REPO_WEB" ] && [ "$SUITE_VERSION" != "unknown" ]; then
if [ -n "$SOURCE_REPO_WEB" ] && [ -n "${COMMIT:-}" ] && [ "$COMMIT" != "unknown" ]; then
SUITE_VERSION_URL="${SOURCE_REPO_WEB}/src/commit/${COMMIT}"
elif [ -n "$SOURCE_REPO_WEB" ] && [ "$SUITE_VERSION" != "unknown" ]; then
SUITE_VERSION_URL="${SOURCE_REPO_WEB}/src/tag/${SUITE_VERSION}"
fi
export SUITE_VERSION SUITE_VERSION_URL

View file

@ -42,6 +42,7 @@ def ui(lang: str, key: str, **kwargs) -> str:
"env_context_empty": "No run header in log",
"generated": "generated",
"version": "version",
"version_tree_link": "open this runs git tree (commit)",
"source": "source",
"what_monitors": "What this monitors",
@ -134,6 +135,7 @@ def ui(lang: str, key: str, **kwargs) -> str:
"env_context_empty": "Pas d'en-tête d'exécution dans le journal",
"generated": "généré",
"version": "version",
"version_tree_link": "ouvrir l'arbre git de cette exécution (commit)",
"source": "source",
"what_monitors": "Ce que cette page contrôle",
@ -956,9 +958,11 @@ def sticky_bar_html(
ver_url = (suite_version_url or "").strip()
if ver:
if ver_url:
# href is usually src/commit/<sha> (exact run tree); label stays vX.Y.Z
version_html = (
f'<a class="version-link" href="{html.escape(ver_url)}" '
f'title="{html.escape(ui(lang, "version"))} {html.escape(ver)}" '
f'title="{html.escape(ui(lang, "version"))} {html.escape(ver)}'
f' · {html.escape(ui(lang, "version_tree_link"))}" '
f'rel="noopener noreferrer">{html.escape(ver)}</a>'
)
else: