Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion site/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading