From f72cdde58f62e75b08a942bea81c76aa09b782e5 Mon Sep 17 00:00:00 2001 From: Andras Banki-Horvath Date: Fri, 4 Apr 2025 08:59:45 +0200 Subject: [PATCH] build: use the stripped commit hash for the embedded commit string --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 25febbb5..0cdeff3f 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ GOBUILD := GO111MODULE=on go build -v GOINSTALL := GO111MODULE=on go install -v GOMOD := GO111MODULE=on go mod -COMMIT := $(shell git describe --abbrev=40 --dirty) +COMMIT := $(shell git describe --abbrev=40 --dirty | sed -E 's/.*-g([0-9a-f]{40})(-dirty)?/\1\2/') LDFLAGS := -ldflags "-X $(PKG).Commit=$(COMMIT)" DEV_TAGS = dev