Skip to content

Commit

Permalink
Merge PR CosmWasm#136: Sanitize Makefile runsim
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez authored Sep 20, 2019
1 parent 08259c4 commit a79a247
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions contrib/devtools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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/[email protected])

golangci-lint: $(GOLANGCI_LINT)

tools-clean:
rm -f $(GOLANGCI_LINT)
rm -f $(RUNSIM)
rm -f tools-stamp

.PHONY: all tools tools-clean

0 comments on commit a79a247

Please sign in to comment.