| 12345678910111213141516171819202122232425262728293031323334353637 |
- #!/bin/sh
- #
- # Use this script to regenerate the Protocol Buffer and gRPC files
- # needed to build the example.
- #
- # Note that it requires updated protoc, protoc-gen-swift, and
- # protoc-gen-swiftgrpc binaries and assumes that protoc-gen-swift
- # is installed in $HOME/local/bin.
- if [ ! -d "googleapis" ]; then
- git clone http://github.com/googleapis/googleapis
- fi
- protoc \
- google/spanner/v1/keys.proto \
- google/spanner/v1/mutation.proto \
- google/spanner/v1/query_plan.proto \
- google/spanner/v1/result_set.proto \
- google/spanner/v1/spanner.proto \
- google/spanner/v1/transaction.proto \
- google/spanner/v1/type.proto \
- google/spanner/admin/instance/v1/spanner_instance_admin.proto \
- google/spanner/admin/database/v1/spanner_database_admin.proto \
- google/longrunning/operations.proto \
- google/rpc/status.proto \
- google/iam/v1/iam_policy.proto \
- google/iam/v1/policy.proto \
- -Igoogleapis \
- --swift_out=googleapis \
- --swiftgrpc_out=googleapis
- # move Swift files to the Sources directory
- find googleapis -name "*.swift" -exec mv {} Sources \;
- # remove the grpc service file; we don't need it
- rm Sources/*.server.pb.swift
|