-
Notifications
You must be signed in to change notification settings - Fork 74
/
Makefile.tools
37 lines (35 loc) · 1.66 KB
/
Makefile.tools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/make -f
BUF = "github.com/bufbuild/buf/cmd/[email protected]"
OAPI_CODEGEN = "github.com/deepmap/oapi-codegen/v2/cmd/[email protected]"
LEFTHOOK = "github.com/evilmartians/[email protected]"
GO_SWAGGER = "github.com/go-swagger/go-swagger/cmd/swagger@abb53530bfcf49c470e5f4c7071ee43f37ec7437" # v0.30.5 currently broken. Update expected shortly. Ref: https://github.com/go-swagger/go-swagger/issues/3070
PROTOBUF = "github.com/gogo/protobuf/[email protected]"
GOLANGCI_LINT = "github.com/golangci/golangci-lint/cmd/[email protected]"
PROTOC_GENGO = "google.golang.org/protobuf/cmd/[email protected]"
PROTOC_VALIDATORS = "github.com/mwitkow/go-proto-validators/[email protected]"
PROTOC_GEN_DOC = "github.com/pseudomuto/protoc-gen-doc/cmd/[email protected]"
PROTOC_GEN_GO_GRPC = "google.golang.org/grpc/cmd/[email protected]"
NFPM = "github.com/goreleaser/nfpm/v2/cmd/[email protected]"
MOCKGEN = "go.uber.org/mock/[email protected]"
GOFUMPT = "mvdan.cc/[email protected]"
COUNTERFEITER = "github.com/maxbrunsfeld/counterfeiter/[email protected]"
install-tools: ## Install tool dependencies
@echo "Installing Tools"
@$(GOGET) $(BUF)
@$(GOGET) $(OAPI_CODEGEN)
@$(GOGET) $(LEFTHOOK)
@$(GOGET) $(GO_SWAGGER)
@$(GOGET) $(PROTOBUF)
@$(GOGET) $(GOLANGCI_LINT)
@$(GOGET) $(PROTOC_GENGO)
@$(GOGET) $(PROTOC_VALIDATORS)
@$(GOGET) $(PROTOC_GEN_DOC)
@$(GOGET) $(PROTOC_GEN_GO_GRPC)
@$(GOGET) $(NFPM)
@$(GOGET) $(MOCKGEN)
@$(GOINST) $(GOFUMPT)
@$(GOGET) $(COUNTERFEITER)
@$(GOGET) ./...
@${GOTIDY}
@echo "Setting up git hooks"
@$(GORUN) $(LEFTHOOK) install pre-push