generate.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. PLUGIN_SWIFT=../../.build/release/protoc-gen-swift
  3. PLUGIN_SWIFTGRPC=../../.build/release/protoc-gen-grpc-swift
  4. PROTO="src/proto/grpc/testing/test.proto"
  5. OUTPUT="Generated"
  6. FILE_NAMING="DropPath"
  7. VISIBILITY="Public"
  8. protoc "src/proto/grpc/testing/test.proto" \
  9. --plugin=${PLUGIN_SWIFT} \
  10. --plugin=${PLUGIN_SWIFTGRPC} \
  11. --swift_out=${OUTPUT} \
  12. --swift_opt=FileNaming=${FILE_NAMING},Visibility=${VISIBILITY} \
  13. --grpc-swift_out=${OUTPUT} \
  14. --grpc-swift_opt=FileNaming=${FILE_NAMING},Visibility=${VISIBILITY}
  15. protoc "src/proto/grpc/testing/empty.proto" \
  16. --plugin=${PLUGIN_SWIFT} \
  17. --plugin=${PLUGIN_SWIFTGRPC} \
  18. --swift_out=${OUTPUT} \
  19. --swift_opt=FileNaming=${FILE_NAMING},Visibility=${VISIBILITY} \
  20. --grpc-swift_out=${OUTPUT} \
  21. --grpc-swift_opt=FileNaming=${FILE_NAMING},Visibility=${VISIBILITY}
  22. protoc "src/proto/grpc/testing/messages.proto" \
  23. --plugin=${PLUGIN_SWIFT} \
  24. --plugin=${PLUGIN_SWIFTGRPC} \
  25. --swift_out=${OUTPUT} \
  26. --swift_opt=FileNaming=${FILE_NAMING},Visibility=${VISIBILITY} \
  27. --grpc-swift_out=${OUTPUT} \
  28. --grpc-swift_opt=FileNaming=${FILE_NAMING},Visibility=${VISIBILITY}
  29. # The generated code needs to be modified to support testing an unimplemented method.
  30. # On the server side, the generated code needs to be removed so the server has no
  31. # knowledge of it. Client code requires no modification, since it is required to call
  32. # the unimplemented method.
  33. patch -p3 < unimplemented_call.patch