-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (41 loc) · 1.05 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
.PHONY: build push compile-go compile-swift compile-rn-bridge
PROTO_INPUT := ./example/proto ./example/proto/debug.proto
DOCKER_USERNAME := anjmao
IMAGE_NAME := $(DOCKER_USERNAME)/grpc-tools
VERSION := 1.0.10
build:
@docker tag $(IMAGE_NAME) $(IMAGE_NAME):latest
@docker build -t $(IMAGE_NAME) .
push:
git tag $(VERSION)
@docker tag $(IMAGE_NAME) $(IMAGE_NAME):$(VERSION)
@docker push $(IMAGE_NAME):$(VERSION)
@docker tag $(IMAGE_NAME) $(IMAGE_NAME):latest
@docker push $(IMAGE_NAME):latest
git push && git push --tags
compile-go:
@docker run \
--rm \
-v "$$(pwd):$$(pwd)" \
-w "$$(pwd)" \
$(IMAGE_NAME) \
--go_out=plugins=grpc:./example/out \
-I $(PROTO_INPUT)
compile-swift:
@docker run \
--rm \
-v "$$(pwd):$$(pwd)" \
-w "$$(pwd)" \
$(IMAGE_NAME) \
--swift_out=./example/out \
--swiftgrpc_out=./example/out \
-I $(PROTO_INPUT)
compile-rn-bridge:
@docker run \
--rm
-v "$$(pwd):$$(pwd)" \
-w "$$(pwd)" \
$(IMAGE_NAME) \
--rn_out=./example/out \
--plugin=protoc-gen-rn=/node_modules/rn-grpc-bridge/bin/rn-grpc-bridge \
-I $(PROTO_INPUT)