| 12345678910111213141516171819202122232425262728 |
- #!/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
- curl -L -O https://github.com/googleapis/googleapis/archive/master.zip
- unzip master.zip
- rm -f master.zip
- mv googleapis-master googleapis
- fi
- protoc \
- googleapis/google/datastore/v1/datastore.proto \
- googleapis/google/datastore/v1/entity.proto \
- googleapis/google/datastore/v1/query.proto \
- googleapis/google/type/latlng.proto \
- -Igoogleapis \
- --swift_out=googleapis \
- --swiftgrpc_out=googleapis
- # move Swift files to the Sources directory
- find googleapis -name "*.swift" -exec mv {} Sources \;
|