-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (26 loc) · 1.13 KB
/
Makefile
File metadata and controls
38 lines (26 loc) · 1.13 KB
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
CGO_ENABLED ?= 0
GOBIN := $(if $(shell go env GOBIN),$(shell go env GOBIN),$(GOPATH)/bin)
PATH := $(GOBIN):$(PATH)
COLOR := "\e[1;36m%s\e[0m\n"
.PHONY: all install generate clean regenerate update-proto-submodule update-proto gomodtidy test
all: install update-proto test
install:
@go install github.com/bufbuild/buf/cmd/buf@latest
update-proto-submodule:
@printf $(COLOR) "Updating api submodule..."
git -c protocol.file.allow=always submodule update --init --force --remote proto/api
cd proto/api && git submodule update --init --force
rm -f proto/api/third_party/api/buf.yaml proto/api/third_party/api/buf.gen.yaml proto/api/third_party/api/buf.lock
generate:
buf generate proto/api/roadrunner/api
buf generate --template buf.gen.connectrpc.yaml --exclude-path proto/api/roadrunner/api/centrifugo proto/api/roadrunner/api
clean:
rm -rf applogger centrifugo common http jobs kv lock service status temporal websockets
regenerate: clean generate
update-proto: update-proto-submodule regenerate gomodtidy
gomodtidy:
@printf $(COLOR) "Running go mod tidy..."
go mod tidy
test:
@printf $(COLOR) "Running build check..."
go build ./...