Merge pull request #2270 from halseth/unit-test-go-sum

[make+mod] fetch correct btcd version
This commit is contained in:
Olaoluwa Osuntokun 2018-12-04 16:35:08 -08:00 committed by GitHub
commit b8d6ac8cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,11 +15,10 @@ 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 }' | \
awk -F "-" '{ print $$3 }' | \
awk -F "/" '{ print $$1 }') awk -F "/" '{ print $$1 }')
GOBUILD := GO111MODULE=on go build -v GOBUILD := GO111MODULE=on go build -v
@ -90,7 +89,7 @@ $(LINT_BIN):
btcd: btcd:
@$(call print, "Installing btcd.") @$(call print, "Installing btcd.")
GO111MODULE=on go get -v github.com/btcsuite/btcd/@v0.0.0-20180823030728-$(BTCD_COMMIT) GO111MODULE=on go get -v github.com/btcsuite/btcd/@$(BTCD_COMMIT)
# ============ # ============
# INSTALLATION # INSTALLATION