-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmk-proto.sh
More file actions
27 lines (20 loc) · 886 Bytes
/
mk-proto.sh
File metadata and controls
27 lines (20 loc) · 886 Bytes
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
# Ensure GOPATH/bin is in the PATH
export PATH=$PATH:$(go env GOPATH)/bin
# dingofs proto path
export PROTO_PATH="./third-party/dingofs-proto"
# proto dir
mkdir -p proto
## dingofs
### dingofs-proto/error.proto
protoc --experimental_allow_proto3_optional --go_out=proto --proto_path=${PROTO_PATH} \
${PROTO_PATH}/dingofs/error.proto
### dingofs-proto/mds.proto
protoc --experimental_allow_proto3_optional --go_out=proto --proto_path=${PROTO_PATH} \
--go_opt=Mdingofs/error.proto=github.com/dingodb/dingocli/proto/dingofs/proto/error \
${PROTO_PATH}/dingofs/mds.proto
### dingofs-proto/cachegroup.proto
protoc --experimental_allow_proto3_optional --go_out=proto --proto_path=${PROTO_PATH} \
${PROTO_PATH}/dingofs/cachegroup.proto
# grpc
## fs
protoc --experimental_allow_proto3_optional --go-grpc_out=proto --proto_path=${PROTO_PATH} ${PROTO_PATH}/dingofs/*.proto