forked from nginx/agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
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