RUNME 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. google/spanner/v1/keys.proto \
  17. google/spanner/v1/mutation.proto \
  18. google/spanner/v1/query_plan.proto \
  19. google/spanner/v1/result_set.proto \
  20. google/spanner/v1/spanner.proto \
  21. google/spanner/v1/transaction.proto \
  22. google/spanner/v1/type.proto \
  23. google/spanner/admin/instance/v1/spanner_instance_admin.proto \
  24. google/spanner/admin/database/v1/spanner_database_admin.proto \
  25. google/longrunning/operations.proto \
  26. google/rpc/status.proto \
  27. google/iam/v1/iam_policy.proto \
  28. google/iam/v1/policy.proto \
  29. -Igoogleapis \
  30. --swift_out=googleapis \
  31. --swiftgrpc_out=googleapis
  32. # move Swift files to the Sources directory
  33. find googleapis -name "*.swift" -exec mv {} Sources \;