-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (36 loc) · 1.34 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
REPOS:=auth-server chat-server chat-client
LOCAL_BIN:=$(CURDIR)/bin
LIBS:=$(CURDIR)/shared/lib
.PHONY: install-deps
install-deps:
GOBIN=$(LOCAL_BIN) go install google.golang.org/protobuf/cmd/[email protected]
GOBIN=$(LOCAL_BIN) go install -mod=mod google.golang.org/grpc/cmd/[email protected]
GOBIN=$(LOCAL_BIN) go install github.com/golangci/golangci-lint/cmd/[email protected]
.PHONY: tidy
tidy:
@set +e
@for dir in $(REPOS); do echo "tidy for $$dir"; cd $$dir; make tidy; cd - > /dev/null; done
@for dir in $(LIBS)/*/; do echo "tidy for $$dir"; cd $$dir; make tidy; cd - > /dev/null; done
.PHONY: generate
generate:
@set +e
@for dir in $(REPOS); do cd $$dir; make generate; cd -; done
.PHONY: lint
lint:
@set +e
@for dir in $(REPOS); do echo "lint for $$dir"; cd $$dir; make lint; @cd - > /dev/null; done
@for dir in $(LIBS)/*/; do echo "lint for $$dir"; cd $$dir; make lint; @cd - > /dev/null; done
.PHONY: tests
tests:
@set +e
@for dir in $(REPOS); do echo "tests for $$dir"; cd $$dir; make tests; @cd - > /dev/null; done
@for dir in $(LIBS)/*/; do echo "tests for $$dir"; cd $$dir; make tests; @cd - > /dev/null; done
.PHONY: dc-up
dc-up:
docker compose up -d
.PHONY: shell-auth-server
shell-auth-server:
docker compose exec auth_service bash
.PHONY: shell-chat-server
shell-chat-server:
docker compose exec chat_service bash