-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathMakefile
71 lines (57 loc) · 1.49 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
export PATH := $(shell pwd)/.tmp/protoc/bin:$(PATH)
export PROTOC_VERSION := 22.0
.PHONY: ci
ci: deps checkgofmt vet staticcheck ineffassign predeclared test
.PHONY: deps
deps:
go get -d -v -t ./...
go mod tidy
.PHONY: updatedeps
updatedeps:
go get -d -v -t -u -f ./...
go mod tidy
.PHONY: install
install:
go install ./...
.PHONY: checkgofmt
checkgofmt:
gofmt -s -l .
@if [ -n "$$(gofmt -s -l .)" ]; then \
exit 1; \
fi
.PHONY: generate
generate: .tmp/protoc/bin/protoc
@go install ./cmd/protoc-gen-grpchan
@go install google.golang.org/protobuf/cmd/[email protected]
@go install google.golang.org/grpc/cmd/[email protected]
go generate ./...
.PHONY: vet
vet:
go vet ./...
.PHONY: staticcheck
staticcheck:
@go install honnef.co/go/tools/cmd/[email protected]
staticcheck ./...
.PHONY: ineffassign
ineffassign:
@go install github.com/gordonklaus/ineffassign@7953dde2c7bf
ineffassign .
.PHONY: predeclared
predeclared:
@go install github.com/nishanths/predeclared@5f2f810c9ae6
predeclared .
# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: golint
golint:
@go install golang.org/x/lint/[email protected]
golint -min_confidence 0.9 -set_exit_status ./...
# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: errcheck
errcheck:
@go install github.com/kisielk/[email protected]
errcheck ./...
.PHONY: test
test:
go test -race ./...
.tmp/protoc/bin/protoc: ./Makefile ./download_protoc.sh
./download_protoc.sh