Version builds from the base tag, not from a published release's tag

git describe had started picking the nearest release tag (v0.1.0-137-gc129f65,
fetched from Gitea), so a build came out as v0.1.0-137-gc129f65-36-g7d0b87b,
which the version compare reads as build 137: older than the 169 it replaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-10-08 15:06:48 -07:00
co-authored by Claude Opus 5.5
parent 7d0b87bc45
commit 07645089d7
+5 -2
View File
@@ -1,5 +1,8 @@
# Commit first, then deploy: the version is the commit the binary was built from. # Commit first, then deploy: the version is the commit the binary was built from, counted
VERSION ?= $(shell git describe --tags --always 2>/dev/null || echo dev) # from the base tag. A published release is tagged with a version of this same shape
# (v0.1.0-137-gc129f65), and described from one of those a build would count from 137 again
# and read as older than what it replaces — so tags with a dash are never the base.
VERSION ?= $(shell git describe --tags --exclude '*-*' --always 2>/dev/null || echo dev)
GO ?= go GO ?= go
PREFIX ?= /usr/local/bin PREFIX ?= /usr/local/bin