RUNME 823 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. 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. googleapis/google/datastore/v1/datastore.proto \
  17. googleapis/google/datastore/v1/entity.proto \
  18. googleapis/google/datastore/v1/query.proto \
  19. googleapis/google/type/latlng.proto \
  20. -Igoogleapis \
  21. --swift_out=googleapis \
  22. --swiftgrpc_out=googleapis
  23. # move Swift files to the Sources directory
  24. find googleapis -name "*.swift" -exec mv {} Sources \;