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:
parent
640fe2558b
commit
bafc44c14b
2
Makefile
2
Makefile
@ -15,7 +15,7 @@ BTCD_DIR :=${GOPATH}/src/$(BTCD_PKG)
|
|||||||
COMMIT := $(shell git describe --abbrev=40 --dirty)
|
COMMIT := $(shell git describe --abbrev=40 --dirty)
|
||||||
LDFLAGS := -ldflags "-X $(PKG)/build.Commit=$(COMMIT)"
|
LDFLAGS := -ldflags "-X $(PKG)/build.Commit=$(COMMIT)"
|
||||||
|
|
||||||
BTCD_COMMIT := $(shell cat go.sum | \
|
BTCD_COMMIT := $(shell cat go.mod | \
|
||||||
grep $(BTCD_PKG) | \
|
grep $(BTCD_PKG) | \
|
||||||
tail -n1 | \
|
tail -n1 | \
|
||||||
awk -F " " '{ print $$2 }' | \
|
awk -F " " '{ print $$2 }' | \
|
||||||
|
Loading…
Reference in New Issue
Block a user