From bafc44c14bee8f57887f6028d2457b021ae1df8c Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Tue, 4 Dec 2018 13:50:46 +0100 Subject: [PATCH] make: get btcd commit hash from go.mod Since go.sum also contains historical commits, we must fetch currenct commit hash from go.mod. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 61b36eb5..4cfdf46d 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ BTCD_DIR :=${GOPATH}/src/$(BTCD_PKG) COMMIT := $(shell git describe --abbrev=40 --dirty) LDFLAGS := -ldflags "-X $(PKG)/build.Commit=$(COMMIT)" -BTCD_COMMIT := $(shell cat go.sum | \ +BTCD_COMMIT := $(shell cat go.mod | \ grep $(BTCD_PKG) | \ tail -n1 | \ awk -F " " '{ print $$2 }' | \