-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (35 loc) · 839 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
# Before using, configure goproxy; see https://goproxy.githubapp.com/setup.
.PHONY: all
all: build
.PHONY: build
build: tools twirp client
tools:
go install github.com/golang/protobuf/protoc-gen-go@v1.5.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
.devcontainer/scripts/install-tools.sh
.PHONY: test
test: test-go
.PHONY: lint
lint: tools vet
@echo "==> linting Go code <=="
@golangci-lint run ./...
.PHONY: vet
vet:
@echo "==> vetting Go code <=="
go vet ./...
.PHONY: proto
proto:
script/helpers/protoc
.PHONY: clean
clean:
rm -f tools
go clean -cache -testcache -modcache
.PHONY: twirp
twirp:
go build -o bin/twirp-service ./cmd/server
.PHONY: client
client:
go build -o bin/twirp-client ./cmd/client
test-go:
@echo "==> running Go tests <=="
CGO_ENABLED=1 go test -p 64 -race ./...