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:
parent
a1fe80a55c
commit
c701728d57
5 changed files with 20 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue