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:
co-authored by
Claude Opus 5.5
parent
7d0b87bc45
commit
07645089d7
@@ -1,5 +1,8 @@
|
||||
# Commit first, then deploy: the version is the commit the binary was built from.
|
||||
VERSION ?= $(shell git describe --tags --always 2>/dev/null || echo dev)
|
||||
# Commit first, then deploy: the version is the commit the binary was built from, counted
|
||||
# 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
|
||||
PREFIX ?= /usr/local/bin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user