RUNME 781 B

1234567891011121314151617181920212223242526
  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. googleapis/google/datastore/v1/datastore.proto \
  12. googleapis/google/datastore/v1/entity.proto \
  13. googleapis/google/datastore/v1/query.proto \
  14. googleapis/google/type/latlng.proto \
  15. -Igoogleapis \
  16. --swift_out=googleapis \
  17. --swiftgrpc_out=Sources
  18. # move swift files to this directory
  19. find googleapis -name "*.swift" -exec mv {} Sources \;
  20. # remove the grpc service file; we don't need it
  21. rm Sources/google.datastore.v1.server.pb.swift