forked from taurusxin/Ofd2Pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 1.19 KB
/
Makefile
File metadata and controls
35 lines (27 loc) · 1.19 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
PROJECT := ofd2pdf
REGISTRY ?= registry.yygu.cn/skills/
VERSION ?= $(shell git describe --tags --always)
IMAGE := $(REGISTRY)$(PROJECT):$(VERSION)
docker-build:
cd Ofd2PdfService && \
docker build -t $(IMAGE) .
docker-push:
docker push $(IMAGE)
docker-release: docker-build docker-push
docker-run:
-docker rm -f $(PROJECT)-dev
docker run -d --name $(PROJECT)-dev -p 8080:8080 $(IMAGE)
install-protoc:
which protoc || (echo "protoc not found, please install it first" && exit 1)
wget -O /tmp/protoc-34.0-linux-x86_64.zip https://github.com/protocolbuffers/protobuf/releases/download/v34.0/protoc-34.0-linux-x86_64.zip
unzip /tmp/protoc-34.0-linux-x86_64.zip -d protoc
sudo mv protoc/bin/* /usr/local/bin/
sudo mv protoc/include/* /usr/local/include/
generate-proto-go:
which protoc-gen-go || go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.11
which protoc-gen-go-grpc || go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1
mkdir -p gen
protoc --go_out=gen --go-grpc_out=gen --proto_path=proto --proto_path=third_party proto/**/*.proto
generate-proto-node:
which protoc-gen-es || npm install -g @bufbuild/protoc-gen-es
protoc --plugin=protoc-gen-es --es_out=. proto/*.proto