Skip to content

Commit f72cdde

Browse files
committed
build: use the stripped commit hash for the embedded commit string
1 parent 46b4f56 commit f72cdde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GOBUILD := GO111MODULE=on go build -v
1515
GOINSTALL := GO111MODULE=on go install -v
1616
GOMOD := GO111MODULE=on go mod
1717

18-
COMMIT := $(shell git describe --abbrev=40 --dirty)
18+
COMMIT := $(shell git describe --abbrev=40 --dirty | sed -E 's/.*-g([0-9a-f]{40})(-dirty)?/\1\2/')
1919
LDFLAGS := -ldflags "-X $(PKG).Commit=$(COMMIT)"
2020
DEV_TAGS = dev
2121

0 commit comments

Comments
 (0)