mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-01 19:30:25 +08:00
脚本使用指南
编译多语言相关源文件
./build-messages.sh
编译API相关源文件
在使用 build.sh 编译 .proto 文件之前,你需要确保已经为 protoc 安装了对应的插件:
# install protoc-gen-go plugin
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
# install protoc-gen-go-grpc plugin
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
之后每次 .proto 文件有更新的时候,请运行 build.sh 重新生成相应的Go源代码和rpc.json文件:
./build.sh
如果文件名有更改,请清空 pkg/rpc/pb/*.go 文件,然后再次运行 build.sh。
生成RPC列表文件
运行:
./proto-json.sh
可以重新生成 rpc.json 文件。