Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devtools' Makefile cleanup #124

Merged
merged 1 commit into from
Sep 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions contrib/devtools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]

$(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