diff options
| author | Joseph Richey <joerichey@google.com> | 2019-10-25 17:26:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-25 17:26:49 -0700 |
| commit | a3434e41bd482fc1b35703f66c24c9d1ec3b0be2 (patch) | |
| tree | 2e41a405c47328760c2787feb75065fa2d354540 /Makefile | |
| parent | b24e4ccd245861f7537f17c3e01be2cbefb1b29e (diff) | |
Manage tool versioning with Go modules (#161)
See: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
The tool code is never actually built, but the versions are still lock
in `go.mod` and `go.sum`. We can also simplify the Makefile.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 20 |
1 files changed, 6 insertions, 14 deletions
@@ -176,25 +176,17 @@ TOOLS := $(addprefix $(BIN)/,protoc golint protoc-gen-go goimports staticcheck g tools: $(TOOLS) $(BIN)/golint: - GO111MODULE=off go get golang.org/x/lint/golint - GO111MODULE=off go build -o $@ golang.org/x/lint/golint + go build -o $@ golang.org/x/lint/golint $(BIN)/protoc-gen-go: - GO111MODULE=off go get -d github.com/golang/protobuf/protoc-gen-go - git -C "$(shell go env GOPATH)/src/github.com/golang/protobuf" checkout v1.2.0 - go install github.com/golang/protobuf/protoc-gen-go - GO111MODULE=off go build -o $@ github.com/golang/protobuf/protoc-gen-go + go build -o $@ github.com/golang/protobuf/protoc-gen-go $(BIN)/goimports: - GO111MODULE=off go get golang.org/x/tools/cmd/goimports - GO111MODULE=off go build -o $@ golang.org/x/tools/cmd/goimports + go build -o $@ golang.org/x/tools/cmd/goimports $(BIN)/staticcheck: - GO111MODULE=off go get honnef.co/go/tools/cmd/staticcheck - GO111MODULE=off go build -o $@ honnef.co/go/tools/cmd/staticcheck + go build -o $@ honnef.co/go/tools/cmd/staticcheck $(BIN)/gocovmerge: - GO111MODULE=off go get github.com/wadey/gocovmerge - GO111MODULE=off go build -o $@ github.com/wadey/gocovmerge + go build -o $@ github.com/wadey/gocovmerge $(BIN)/misspell: - GO111MODULE=off go get github.com/client9/misspell - GO111MODULE=off go build -o $@ github.com/client9/misspell/cmd/misspell + go build -o $@ github.com/client9/misspell/cmd/misspell # Non-go tools downloaded from appropriate repository PROTOC_VERSION := 3.6.1 |