From 7508c04ecc6ee4696eb60855bae056c06e3f5c18 Mon Sep 17 00:00:00 2001 From: Harshal Gajjar Date: Mon, 5 Oct 2026 20:43:35 -0700 Subject: [PATCH] site: the hero's version is the newest release tag build.sh stamped public/assets/version.txt with the nearest tag of any kind. A checkout carrying other tags got a non-version (the hero rejects it and prints its fallback, 3.0.6, which is what reminal.app shows now), and the nearest release in a checkout's history can be an older one. It now takes the newest vX.Y.Z tag by version: v3.16.0 today, matching the latest GitHub release. Co-Authored-By: Claude Opus 5.5 --- site/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/site/build.sh b/site/build.sh index 3e052cab..8fc7e1c8 100755 --- a/site/build.sh +++ b/site/build.sh @@ -53,7 +53,10 @@ done # The hero terminal prints a version, so it has to be the real one. Hardcoding # it meant the site advertised v3.0.3 while people were installing v3.0.6. -VERSION="$(git -C .. describe --tags --abbrev=0 2>/dev/null | sed 's/^v//')" +# The newest release tag (vX.Y.Z) by version, not the nearest tag: a checkout +# can carry other tags, and the nearest release in its history can be an +# older one. +VERSION="$(git -C .. tag --list 'v[0-9]*' --sort=-v:refname 2>/dev/null | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1 | sed 's/^v//')" if [ -n "$VERSION" ]; then printf '%s' "$VERSION" > "$OUT/version.txt" echo " version $VERSION"