multiple_rpc_service_generate.sh 366 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. wd=$(pwd)
  3. output="$wd/hi"
  4. rm -rf $output
  5. goctl rpc protoc -I $wd "$wd/hi.proto" --go_out="$output/pb" --go-grpc_out="$output/pb" --zrpc_out="$output" --multiple
  6. if [ $? -ne 0 ]; then
  7. echo "Generate failed"
  8. exit 1
  9. fi
  10. GOPROXY="https://goproxy.cn,direct" && go mod tidy
  11. if [ $? -ne 0 ]; then
  12. echo "Tidy failed"
  13. exit 1
  14. fi
  15. go test ./...