make: get btcd commit hash from go.mod

Since go.sum also contains historical commits, we must fetch currenct
commit hash from go.mod.
This commit is contained in:
Johan T. Halseth committed 2018-12-04 13:50:51 +01:00
1 parent 640fe2558b
commit bafc44c14b
1 file changed
+1 -1
+1 -1
View File
@@ -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 }' | \