3
3
#
4
4
# SPDX-License-Identifier: Apache-2.0
5
5
6
- GOTOOLS = dep golint goimports protoc-gen-go ginkgo gocov gocov-xml misspell
6
+ GOTOOLS = counterfeiter dep golint goimports protoc-gen-go ginkgo gocov gocov-xml misspell mockery
7
7
BUILD_DIR ?= .build
8
8
GOTOOLS_GOPATH ?= $(BUILD_DIR ) /gotools
9
9
GOTOOLS_BINDIR ?= $(GOPATH ) /bin
10
10
11
11
# go tool->path mapping
12
- go.fqp.golint := github.com/golang/lint/golint
13
- go.fqp.goimports := golang.org/x/tools/cmd/goimports
14
- go.fqp.gocov := github.com/axw/gocov/...
15
- go.fqp.misspell := github.com/client9/misspell/cmd/misspell
16
- go.fqp.gocov-xml := github.com/AlekSi/gocov-xml
12
+ go.fqp.counterfeiter := github.com/maxbrunsfeld/counterfeiter
13
+ go.fqp.gocov := github.com/axw/gocov/gocov
14
+ go.fqp.gocov-xml := github.com/AlekSi/gocov-xml
15
+ go.fqp.goimports := golang.org/x/tools/cmd/goimports
16
+ go.fqp.golint := github.com/golang/lint/golint
17
+ go.fqp.misspell := github.com/client9/misspell/cmd/misspell
18
+ go.fqp.mockery := github.com/vektra/mockery/cmd/mockery
17
19
18
20
.PHONY : gotools-install
19
21
gotools-install : $(patsubst % ,$(GOTOOLS_BINDIR ) /% , $(GOTOOLS ) )
@@ -39,10 +41,9 @@ gotool.ginkgo:
39
41
# Lock to a versioned dep
40
42
gotool.dep : DEP_VERSION ?= "v0.4.1"
41
43
gotool.dep :
42
- @echo " Getting dep $( DEP_VERSION) "
43
44
@GOPATH=$(abspath $(GOTOOLS_GOPATH ) ) go get -d -u github.com/golang/dep
44
45
@git -C $(abspath $(GOTOOLS_GOPATH ) ) /src/github.com/golang/dep checkout -q $(DEP_VERSION )
45
- @echo " Building github.com/golang/dep -> dep"
46
+ @echo " Building github.com/golang/dep $( DEP_VERSION ) -> dep"
46
47
@GOPATH=$(abspath $(GOTOOLS_GOPATH ) ) GOBIN=$(abspath $(GOTOOLS_BINDIR ) ) go install -ldflags=" -X main.version=$( DEP_VERSION) -X main.buildDate=$$ (date '+%Y-%m-%d')" github.com/golang/dep/cmd/dep
47
48
@git -C $(abspath $(GOTOOLS_GOPATH ) ) /src/github.com/golang/dep checkout -q master
48
49
0 commit comments