Merge PR #124: devtools' Makefile cleanup

This commit is contained in:
Alessio Treglia
2019-09-12 15:16:11 +02:00
committed by Alexander Bezobchuk
parent 6fa5988730
commit f35c63d672

View File

@@ -17,8 +17,8 @@ endif
GOPATH ?= $(shell $(GO) env GOPATH)
GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com
GOLANGCI_LINT_VERSION := v1.17.1
GOLANGCI_LINT_HASHSUM := f5fa647a12f658924d9f7d6b9628d505ab118e8e049e43272de6526053ebe08d
GOLANGCI_LINT_VERSION := v1.18.0
GOLANGCI_LINT_HASHSUM := 8d21cc95da8d3daf8321ac40091456fc26123c964d7c2281d339d431f2f4c840
###
# Functions
@@ -45,28 +45,24 @@ mkfile_dir := $(shell cd $(shell dirname $(mkfile_path)); pwd)
TOOLS_DESTDIR ?= $(GOPATH)/bin
GOLANGCI_LINT = $(TOOLS_DESTDIR)/golangci-lint
GOIMPORTS = $(TOOLS_DESTDIR)/goimports
RUNSIM = $(TOOLS_DESTDIR)/runsim
all: tools
tools: tools-stamp
tools-stamp: $(GOIMPORTS) $(RUNSIM)
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)
$(GOIMPORTS):
go get golang.org/x/tools/cmd/goimports@v0.0.0-20190628034336-212fb13d595e
$(RUNSIM):
go install github.com/cosmos/tools/cmd/runsim/
golangci-lint: $(GOLANGCI_LINT)
tools-clean:
rm -f $(GOIMPORTS) $(GOLANGCI_LINT)
rm -f $(GOLANGCI_LINT)
rm -f tools-stamp
.PHONY: all tools tools-clean