-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (28 loc) · 964 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
GOPATH:=$(shell go env GOPATH)
NAME := mikudos_message_deliver-srv
SERVICE_VERSION := 0.0.1
PORT := 50051
.PHONY: update-proto
update-proto:
./update_proto.sh
.PHONY: proto
proto:
protoc --proto_path=${GOPATH}/src:. --go_out=plugins=grpc:. proto/message-deliver/*.proto
protoc --proto_path=${GOPATH}/src:. --go_out=plugins=grpc:. proto/message-pusher/*.proto
.PHONY: build
build: proto
go build -o $(NAME) main.go
.PHONY: docker
docker:
make build
docker build . -t asia.gcr.io/kubenetes-test-project-249803/$(NAME):$(SERVICE_VERSION)
.PHONY: run-docker
run-docker:
docker run --rm -p $(PORT):$(PORT) --name $(NAME) asia.gcr.io/kubenetes-test-project-249803/$(NAME):$(SERVICE_VERSION)
.PHONY: run-client
run-client:
grpcc --proto ./proto/schedule/schedule.proto --address 127.0.0.1:$(PORT) -i
# client.listSchedule({}, sr).on("data", data=>{console.log(data)})
.PHONY: git
git:
git pull && git add . && git commit -m "update update.sh" && git push