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