RUNME 750 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. #
  3. # Use this script to regenerate the Protocol Buffer and gRPC files
  4. # needed to build the example.
  5. #
  6. # Note that it requires updated protoc, protoc-gen-swift, and
  7. # protoc-gen-swiftgrpc binaries and assumes that protoc-gen-swift
  8. # is installed in $HOME/local/bin.
  9. git clone http://github.com/googleapis/googleapis
  10. protoc \
  11. google/cloud/language/v1/language_service.proto \
  12. google/api/annotations.proto \
  13. google/api/http.proto \
  14. google/protobuf/descriptor.proto \
  15. -Igoogleapis \
  16. -Iprotoc/include \
  17. --swift_out=googleapis \
  18. --swiftgrpc_out=Sources
  19. # move swift files to this directory
  20. find googleapis -name "*.swift" -exec mv {} Sources \;
  21. # remove the grpc service file; we don't need it
  22. rm Sources/google.*.server.pb.swift