From dc800ec3b7ae7fcd37a656902ad27ab7d319b021 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 11 Mar 2026 18:58:04 -0400 Subject: [PATCH] feat: use git-describe for setting the version string (#1522) This change uses git-describe to set the version string, which improves the user experience by always showing the most recent tag, with additional git data (such as the delta of a commits between that tag and HEAD). Before this change, we see the following output: git-bug undefined 7468b3793fbf go1.24.9 linux amd64 With this change, the output becomes: git-bug v0.10.1-24-gb957ba2e-dirty b957ba2e5947/dirty go1.24.9 linux amd64 The duplicated VCS information does add noise, however, this will be dealt with in a future commit. --------- Co-authored-by: sudoforge --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4745d195db612ace950380c2760d0fd3d4217a89..e613dea639f7e9c01de297261000ac4096e34487 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ endif SYSTEM=$(shell nix eval --impure --expr 'builtins.currentSystem' --raw 2>/dev/null || echo '') -TAG:=$(shell git name-rev --name-only --tags HEAD) +TAG:=$(shell git describe --match 'v*' --always --dirty --broken) LDFLAGS:=-X main.version="${TAG}" all: build