-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (37 loc) · 1.14 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
PUSH ?= 0
autogen:
@protoc \
--proto_path=post_storage/proto \
--go_out=post_storage \
--go_opt=Mpost_storage.proto=proto/autogen/post_storage \
--go-grpc_opt=Mpost_storage.proto=proto/autogen/post_storage \
--go-grpc_out=post_storage \
post_storage.proto
@protoc \
--proto_path=post_api/proto \
--go_out=post_api \
--go_opt=Mpost_api.proto=proto/autogen/post_api \
--go-grpc_opt=Mpost_api.proto=proto/autogen/post_api \
--go-grpc_out=post_api \
post_api.proto
@echo "Generated files from proto successfully!"
.PHONY: api
api: autogen
@docker build -t post-api-grpc:latest -t homayoonalimohammadi/post-api-grpc:latest .
@if [ "$$PUSH" = "1" ]; then \
docker push homayoonalimohammadi/post-api-grpc:latest; \
fi
kind load docker-image post-api-grpc:latest
.PHONY: storage
storage: autogen
@docker build -t post-storage-grpc:latest -t homayoonalimohammadi/post-storage-grpc:latest ./post_storage
@if [ "$$PUSH" = "1" ]; then \
docker push homayoonalimohammadi/post-storage-grpc:latest; \
fi
kind load docker-image post-storage-grpc:latest
.PHONY: both
both: api storage
@echo "Made both!"
.PHONY: up
up: autogen
@docker compose up