mirror of https://github.com/grpc/grpc-java.git
buildscripts: Add script to sync .protos from grpc-proto
Currently only protos in alts, grpclb, and services are synced. Once some java_package options are "upstreamed", benchmarks and interop-testing could also be synced.
This commit is contained in:
parent
9eeceab597
commit
186409f868
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
curl -Ls https://github.com/grpc/grpc-proto/archive/master.tar.gz | tar xz -C "$tmpdir"
|
||||
base="$tmpdir/grpc-proto-master"
|
||||
|
||||
# Copy protos in 'src/main/proto' from grpc-proto for these projects
|
||||
for project in alts grpclb services; do
|
||||
while read -r proto; do
|
||||
[ -f "$base/$proto" ] && cp "$base/$proto" "$project/src/main/proto/$proto"
|
||||
echo "$proto"
|
||||
done < <(cd "$project/src/main/proto" && find . -name "*.proto")
|
||||
done | sort > "$tmpdir/grpc-java.lst"
|
||||
|
||||
(cd "$base" && find . -name "*.proto") | sort > "$tmpdir/base.lst"
|
||||
echo "Files synced:"
|
||||
comm -12 "$tmpdir/grpc-java.lst" "$tmpdir/base.lst"
|
||||
|
||||
echo
|
||||
echo "Files in grpc-proto not synced:"
|
||||
comm -13 "$tmpdir/grpc-java.lst" "$tmpdir/base.lst"
|
||||
|
||||
echo
|
||||
echo "Files in grpc-java not synced:"
|
||||
comm -23 "$tmpdir/grpc-java.lst" "$tmpdir/base.lst"
|
||||
|
||||
rm -r "$tmpdir"
|
|
@ -19,7 +19,7 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
|||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler",
|
||||
comments = "Source: io/grpc/reflection/v1alpha/reflection.proto")
|
||||
comments = "Source: grpc/reflection/v1alpha/reflection.proto")
|
||||
public final class ServerReflectionGrpc {
|
||||
|
||||
private ServerReflectionGrpc() {}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
@ -63,42 +63,41 @@ package io.grpc.reflection.v1alpha;
|
|||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n+io/grpc/reflection/v1alpha/reflection." +
|
||||
"proto\022\027grpc.reflection.v1alpha\"\212\002\n\027Serve" +
|
||||
"rReflectionRequest\022\014\n\004host\030\001 \001(\t\022\032\n\020file" +
|
||||
"_by_filename\030\003 \001(\tH\000\022 \n\026file_containing_" +
|
||||
"symbol\030\004 \001(\tH\000\022N\n\031file_containing_extens" +
|
||||
"ion\030\005 \001(\0132).grpc.reflection.v1alpha.Exte" +
|
||||
"nsionRequestH\000\022\'\n\035all_extension_numbers_" +
|
||||
"of_type\030\006 \001(\tH\000\022\027\n\rlist_services\030\007 \001(\tH\000" +
|
||||
"B\021\n\017message_request\"E\n\020ExtensionRequest\022" +
|
||||
"\027\n\017containing_type\030\001 \001(\t\022\030\n\020extension_nu" +
|
||||
"mber\030\002 \001(\005\"\321\003\n\030ServerReflectionResponse\022" +
|
||||
"\022\n\nvalid_host\030\001 \001(\t\022J\n\020original_request\030" +
|
||||
"\002 \001(\01320.grpc.reflection.v1alpha.ServerRe" +
|
||||
"flectionRequest\022S\n\030file_descriptor_respo" +
|
||||
"nse\030\004 \001(\0132/.grpc.reflection.v1alpha.File" +
|
||||
"DescriptorResponseH\000\022Z\n\036all_extension_nu" +
|
||||
"mbers_response\030\005 \001(\01320.grpc.reflection.v" +
|
||||
"1alpha.ExtensionNumberResponseH\000\022N\n\026list" +
|
||||
"_services_response\030\006 \001(\0132,.grpc.reflecti" +
|
||||
"on.v1alpha.ListServiceResponseH\000\022@\n\016erro" +
|
||||
"r_response\030\007 \001(\0132&.grpc.reflection.v1alp" +
|
||||
"ha.ErrorResponseH\000B\022\n\020message_response\"7" +
|
||||
"\n\026FileDescriptorResponse\022\035\n\025file_descrip" +
|
||||
"tor_proto\030\001 \003(\014\"K\n\027ExtensionNumberRespon" +
|
||||
"se\022\026\n\016base_type_name\030\001 \001(\t\022\030\n\020extension_" +
|
||||
"number\030\002 \003(\005\"P\n\023ListServiceResponse\0229\n\007s" +
|
||||
"ervice\030\001 \003(\0132(.grpc.reflection.v1alpha.S" +
|
||||
"erviceResponse\"\037\n\017ServiceResponse\022\014\n\004nam" +
|
||||
"e\030\001 \001(\t\":\n\rErrorResponse\022\022\n\nerror_code\030\001" +
|
||||
" \001(\005\022\025\n\rerror_message\030\002 \001(\t2\223\001\n\020ServerRe" +
|
||||
"flection\022\177\n\024ServerReflectionInfo\0220.grpc." +
|
||||
"reflection.v1alpha.ServerReflectionReque" +
|
||||
"st\0321.grpc.reflection.v1alpha.ServerRefle" +
|
||||
"ctionResponse(\0010\001B8\n\032io.grpc.reflection." +
|
||||
"v1alphaB\025ServerReflectionProtoP\001\270\001\001b\006pro" +
|
||||
"to3"
|
||||
"\n(grpc/reflection/v1alpha/reflection.pro" +
|
||||
"to\022\027grpc.reflection.v1alpha\"\212\002\n\027ServerRe" +
|
||||
"flectionRequest\022\014\n\004host\030\001 \001(\t\022\032\n\020file_by" +
|
||||
"_filename\030\003 \001(\tH\000\022 \n\026file_containing_sym" +
|
||||
"bol\030\004 \001(\tH\000\022N\n\031file_containing_extension" +
|
||||
"\030\005 \001(\0132).grpc.reflection.v1alpha.Extensi" +
|
||||
"onRequestH\000\022\'\n\035all_extension_numbers_of_" +
|
||||
"type\030\006 \001(\tH\000\022\027\n\rlist_services\030\007 \001(\tH\000B\021\n" +
|
||||
"\017message_request\"E\n\020ExtensionRequest\022\027\n\017" +
|
||||
"containing_type\030\001 \001(\t\022\030\n\020extension_numbe" +
|
||||
"r\030\002 \001(\005\"\321\003\n\030ServerReflectionResponse\022\022\n\n" +
|
||||
"valid_host\030\001 \001(\t\022J\n\020original_request\030\002 \001" +
|
||||
"(\01320.grpc.reflection.v1alpha.ServerRefle" +
|
||||
"ctionRequest\022S\n\030file_descriptor_response" +
|
||||
"\030\004 \001(\0132/.grpc.reflection.v1alpha.FileDes" +
|
||||
"criptorResponseH\000\022Z\n\036all_extension_numbe" +
|
||||
"rs_response\030\005 \001(\01320.grpc.reflection.v1al" +
|
||||
"pha.ExtensionNumberResponseH\000\022N\n\026list_se" +
|
||||
"rvices_response\030\006 \001(\0132,.grpc.reflection." +
|
||||
"v1alpha.ListServiceResponseH\000\022@\n\016error_r" +
|
||||
"esponse\030\007 \001(\0132&.grpc.reflection.v1alpha." +
|
||||
"ErrorResponseH\000B\022\n\020message_response\"7\n\026F" +
|
||||
"ileDescriptorResponse\022\035\n\025file_descriptor" +
|
||||
"_proto\030\001 \003(\014\"K\n\027ExtensionNumberResponse\022" +
|
||||
"\026\n\016base_type_name\030\001 \001(\t\022\030\n\020extension_num" +
|
||||
"ber\030\002 \003(\005\"P\n\023ListServiceResponse\0229\n\007serv" +
|
||||
"ice\030\001 \003(\0132(.grpc.reflection.v1alpha.Serv" +
|
||||
"iceResponse\"\037\n\017ServiceResponse\022\014\n\004name\030\001" +
|
||||
" \001(\t\":\n\rErrorResponse\022\022\n\nerror_code\030\001 \001(" +
|
||||
"\005\022\025\n\rerror_message\030\002 \001(\t2\223\001\n\020ServerRefle" +
|
||||
"ction\022\177\n\024ServerReflectionInfo\0220.grpc.ref" +
|
||||
"lection.v1alpha.ServerReflectionRequest\032" +
|
||||
"1.grpc.reflection.v1alpha.ServerReflecti" +
|
||||
"onResponse(\0010\001B8\n\032io.grpc.reflection.v1a" +
|
||||
"lphaB\025ServerReflectionProtoP\001\270\001\001b\006proto3"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: io/grpc/reflection/v1alpha/reflection.proto
|
||||
// source: grpc/reflection/v1alpha/reflection.proto
|
||||
|
||||
package io.grpc.reflection.v1alpha;
|
||||
|
||||
|
|
Loading…
Reference in New Issue