From deea02b1ab3ada6f0eccc4b4e1a89856c35b798e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sat, 23 Dec 2023 10:04:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BC=96=E8=AF=91=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/build.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/build/build.sh b/build/build.sh index 1bf27e6..05868d8 100755 --- a/build/build.sh +++ b/build/build.sh @@ -2,27 +2,27 @@ echo "starting ..." +function assert() { + RESULT=$? + if [ "${RESULT}" != "0" ]; then + exit + fi +} + #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 +assert protoc --go-grpc_out=../pkg/rpc --go-grpc_opt=require_unimplemented_servers=false --proto_path=../pkg/rpc/protos ../pkg/rpc/protos/*.proto -RESULT=$? -if [ "${RESULT}" != "0" ]; then - exit -fi +assert protoc --go_out=../pkg/rpc --proto_path=../pkg/rpc/protos ../pkg/rpc/protos/models/*.proto RESULT=$? -if [ "${RESULT}" != "0" ]; then - exit -fi +assert # generate rpc.json ./proto-json.sh --quiet +assert echo "ok" \ No newline at end of file