From a8130f0c407b5a5439da37b0ae4c970ce06ef41c Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 18 Sep 2019 13:26:14 -0700 Subject: [PATCH 1/5] Makefile: remove -u when installing go-acc --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b9b00c714..bd114c9a0 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ $(LINT_BIN): $(GOACC_BIN): @$(call print, "Fetching go-acc") - go get -u -v $(GOACC_PKG)@$(GOACC_COMMIT) + GO111MODULE=on go get -v $(GOACC_PKG)@$(GOACC_COMMIT) $(GOINSTALL) $(GOACC_PKG) btcd: From 697974c9cfe801af841cc872ed63fd13469d57e7 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 18 Sep 2019 14:01:12 -0700 Subject: [PATCH 2/5] Makefile: remove extraneous go install calls for module deps --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index bd114c9a0..d41206bf5 100644 --- a/Makefile +++ b/Makefile @@ -79,13 +79,10 @@ $(LINT_BIN): $(GOACC_BIN): @$(call print, "Fetching go-acc") GO111MODULE=on go get -v $(GOACC_PKG)@$(GOACC_COMMIT) - $(GOINSTALL) $(GOACC_PKG) btcd: @$(call print, "Installing btcd.") GO111MODULE=on go get -v $(BTCD_PKG)@$(BTCD_COMMIT) - $(GOINSTALL) $(BTCD_PKG) - $(GOINSTALL) $(BTCD_PKG)/cmd/btcctl # ============ # INSTALLATION From ed8913f08a55ea59a63ef93b3484082058ebfe54 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 18 Sep 2019 14:01:49 -0700 Subject: [PATCH 3/5] Makefile: add verbose output to go get for linter --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d41206bf5..ad729f7db 100644 --- a/Makefile +++ b/Makefile @@ -74,7 +74,7 @@ $(LINT_BIN): # Switch to tmp directory to prevent lnd go.mod from being modified. # Hopefully someday a flag for go get will be added for this. cd /tmp - GO111MODULE=on go get $(LINT_PKG) + GO111MODULE=on go get -v $(LINT_PKG) $(GOACC_BIN): @$(call print, "Fetching go-acc") From 4e5c4df098c489097613d6324844467006d44890 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 18 Sep 2019 14:03:18 -0700 Subject: [PATCH 4/5] Makefile: remove side-effects to go.mod when installing all deps This commit applies the same cd /tmp prefix to installations for all dependencies. It also corrects the previous behavior, which requires the cd /tmp to be in the same command, and not separate statements. --- Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ad729f7db..53da4d631 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ BTCD_COMMIT := $(shell cat go.mod | \ GOACC_COMMIT := ddc355013f90fea78d83d3a6c71f1d37ac07ecd5 +DEPGET := cd /tmp && GO111MODULE=on go get -v GOBUILD := GO111MODULE=on go build -v -trimpath GOINSTALL := GO111MODULE=on go install -v -trimpath GOTEST := GO111MODULE=on go test -v @@ -71,18 +72,15 @@ $(GOVERALLS_BIN): $(LINT_BIN): @$(call print, "Fetching linter") - # Switch to tmp directory to prevent lnd go.mod from being modified. - # Hopefully someday a flag for go get will be added for this. - cd /tmp - GO111MODULE=on go get -v $(LINT_PKG) + $(DEPGET) $(LINT_PKG) $(GOACC_BIN): @$(call print, "Fetching go-acc") - GO111MODULE=on go get -v $(GOACC_PKG)@$(GOACC_COMMIT) + $(DEPGET) $(GOACC_PKG)@$(GOACC_COMMIT) btcd: @$(call print, "Installing btcd.") - GO111MODULE=on go get -v $(BTCD_PKG)@$(BTCD_COMMIT) + $(DEPGET) $(BTCD_PKG)@$(BTCD_COMMIT) # ============ # INSTALLATION From cd7610ff41bd8434999e96a6f16cdfa5a0d9ae66 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 18 Sep 2019 14:05:11 -0700 Subject: [PATCH 5/5] Makefile: remove linter version from pkg definition --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 53da4d631..60f13e1a1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ MOBILE_PKG := $(PKG)/mobile BTCD_PKG := github.com/btcsuite/btcd GOVERALLS_PKG := github.com/mattn/goveralls -LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0 +LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint GOACC_PKG := github.com/ory/go-acc GO_BIN := ${GOPATH}/bin @@ -30,6 +30,7 @@ BTCD_COMMIT := $(shell cat go.mod | \ awk -F " " '{ print $$2 }' | \ awk -F "/" '{ print $$1 }') +LINT_COMMIT := v1.18.0 GOACC_COMMIT := ddc355013f90fea78d83d3a6c71f1d37ac07ecd5 DEPGET := cd /tmp && GO111MODULE=on go get -v @@ -72,7 +73,7 @@ $(GOVERALLS_BIN): $(LINT_BIN): @$(call print, "Fetching linter") - $(DEPGET) $(LINT_PKG) + $(DEPGET) $(LINT_PKG)@$(LINT_COMMIT) $(GOACC_BIN): @$(call print, "Fetching go-acc")