编译proto文件时捕捉错误提示

This commit is contained in:
刘祥超
2023-08-12 20:48:53 +08:00
parent b6667fc323
commit 15708ec1bb

View File

@@ -4,6 +4,10 @@ echo "starting ..."
#rm -f ../pkg/rpc/pb/*.pb.go
protoc --go_out=../pkg/rpc --proto_path=../pkg/rpc/protos ../pkg/rpc/protos/*.proto
RESULT=$?
if [ "${RESULT}" != "0" ]; then
exit
fi
protoc --go-grpc_out=../pkg/rpc --go-grpc_opt=require_unimplemented_servers=false --proto_path=../pkg/rpc/protos ../pkg/rpc/protos/*.proto
RESULT=$?