RUNME 859 B

12345678910111213141516171819202122232425262728
  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. --swift_opt=Visibility=Public \
  18. --plugin=$HOME/local/bin/protoc-gen-swift \
  19. --swiftgrpc_out=Sources
  20. # move swift files to this directory
  21. find googleapis -name "*.swift" -exec mv {} Sources \;
  22. # remove the grpc service file; we don't need it
  23. rm Sources/google.datastore.v1.server.pb.swift