RUNME 914 B

1234567891011121314151617181920212223242526272829303132
  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-grpc-swift binaries and assumes that protoc-gen-swift
  8. # is installed in $HOME/local/bin.
  9. if [ ! -d "googleapis" ]; then
  10. curl -L -O https://github.com/googleapis/googleapis/archive/master.zip
  11. unzip master.zip
  12. rm -f master.zip
  13. mv googleapis-master googleapis
  14. fi
  15. protoc \
  16. google/cloud/language/v1/language_service.proto \
  17. google/api/annotations.proto \
  18. google/api/http.proto \
  19. google/protobuf/descriptor.proto \
  20. -Igoogleapis \
  21. -I../common/include \
  22. --swift_out=googleapis \
  23. --grpc-swift_out=googleapis
  24. # Move Swift files to the Sources directory. descriptor.pb.swift is provided
  25. # with SwiftProtobuf (from 1.7.0).
  26. find googleapis \
  27. -name "*.swift" \
  28. ! -name "descriptor.pb.swift" \
  29. -exec mv {} Sources \;