From a79a2473763a14afeb6c130cce5c9aec149e6220 Mon Sep 17 00:00:00 2001 From: Alexander Bezobchuk Date: Fri, 20 Sep 2019 09:47:15 -0400 Subject: [PATCH] Merge PR #136: Sanitize Makefile runsim --- contrib/devtools/Makefile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile index 34115ec28..2bd8b5c49 100644 --- a/contrib/devtools/Makefile +++ b/contrib/devtools/Makefile @@ -43,9 +43,8 @@ mkfile_dir := $(shell cd $(shell dirname $(mkfile_path)); pwd) ### TOOLS_DESTDIR ?= $(GOPATH)/bin - -GOLANGCI_LINT = $(TOOLS_DESTDIR)/golangci-lint -RUNSIM = $(TOOLS_DESTDIR)/runsim +GOLANGCI_LINT = $(TOOLS_DESTDIR)/golangci-lint +RUNSIM = $(TOOLS_DESTDIR)/runsim all: tools @@ -54,15 +53,23 @@ tools-stamp: $(RUNSIM) touch $@ $(GOLANGCI_LINT): $(mkfile_dir)/install-golangci-lint.sh - bash $(mkfile_dir)/install-golangci-lint.sh $(TOOLS_DESTDIR) $(GOLANGCI_LINT_VERSION) $(GOLANGCI_LINT_HASHSUM) - + @echo "Installing golangci-lint..." + @bash $(mkfile_dir)/install-golangci-lint.sh $(TOOLS_DESTDIR) $(GOLANGCI_LINT_VERSION) $(GOLANGCI_LINT_HASHSUM) + +# Install the runsim binary with a temporary workaround of entering an outside +# directory as the "go get" command ignores the -mod option and will polute the +# go.{mod, sum} files. +# +# ref: https://github.com/golang/go/issues/30515 $(RUNSIM): - go install github.com/cosmos/tools/cmd/runsim/ + @echo "Installing runsim..." + @(cd /tmp && go get github.com/cosmos/tools/cmd/runsim@v1.0.0) golangci-lint: $(GOLANGCI_LINT) tools-clean: rm -f $(GOLANGCI_LINT) + rm -f $(RUNSIM) rm -f tools-stamp .PHONY: all tools tools-clean