-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (38 loc) · 915 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
40
41
42
43
44
45
46
47
48
49
all: check
# Run simple checks
.PHONY: check
check:
go vet ./...
go test -run xxxx ./...
# Install dependencies
.PHONY: deps
deps:
GO111MODULE=on go mod vendor
bash .scripts/install-go-gen.sh
# Execute tests
.PHONY: test
test:
go test -race -cover ./...
# Run linters and checks
.PHONY: lint
lint: check
go fmt ./...
golint `go list ./... | grep -v /vendor/`
# Generate protobuf code from definitions
.PHONY: proto
proto:
make proto-service PKG=lens
make proto-pkg PKG=lens/request
make proto-pkg PKG=lens/response
make proto-service PKG=pay
make proto-pkg PKG=pay/request
make proto-pkg PKG=pay/response
make proto-service PKG=nexus
make proto-service PKG=krab
make proto-service PKG=lensv2
.PHONY: proto-service
proto-service:
protoc -I $(PKG) $(PKG)/service.proto --go_out=plugins=grpc:$(PKG)
.PHONY: proto-pkg
proto-pkg:
protoc -I $(PKG) $(PKG)/*.proto --go_out=plugins=grpc:$(PKG)