-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile
39 lines (31 loc) · 788 Bytes
/
Makefile
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
38
39
PROTOWRAP=hack/bin/protowrap
PROTOC_GEN_GO=hack/bin/protoc-gen-go
GOLANGCI_LINT=hack/bin/golangci-lint
export GO111MODULE=on
GOLIST=go list -f "{{ .Dir }}" -m
all:
vendor:
go mod vendor
$(PROTOC_GEN_GO):
cd ./hack; \
go build -v \
-o ./bin/protoc-gen-go \
github.com/golang/protobuf/protoc-gen-go
$(PROTOWRAP):
cd ./hack; \
go build -v \
-o ./bin/protowrap \
github.com/square/goprotowrap/cmd/protowrap
$(GOLANGCI_LINT):
cd ./hack; \
go build -v \
-o ./bin/golangci-lint \
github.com/golangci/golangci-lint/cmd/golangci-lint
gengo: $(PROTOWRAP) $(PROTOC_GEN_GO) vendor
export PATH=$$(pwd)/hack/bin:$${PATH}; \
cd ./generator && ./update_protos.bash; \
cd ../apigen && ./apigen.bash
lint: $(GOLANGCI_LINT)
$(GOLANGCI_LINT) run ./...
test:
go build -v ./...