*: regen protofiles with latest protobuf tools

This commit is contained in:
Anthony Romano
2017-06-12 14:25:01 -07:00
parent 2afd0a726f
commit 4ebeba0e18
5 changed files with 912 additions and 37 deletions

View File

@@ -10,9 +10,8 @@ if ! [[ "$0" =~ "scripts/genproto.sh" ]]; then
exit 255
fi
# for now, be conservative about what version of protoc we expect
if ! [[ $(protoc --version) =~ "3.2.0" ]]; then
echo "could not find protoc 3.2.0, is it installed + in PATH?"
if ! [[ $(protoc --version) =~ "3.3.0" ]]; then
echo "could not find protoc 3.3.0, is it installed + in PATH?"
exit 255
fi
@@ -20,8 +19,8 @@ fi
DIRS="./wal/walpb ./etcdserver/etcdserverpb ./snap/snappb ./raft/raftpb ./mvcc/mvccpb ./lease/leasepb ./auth/authpb ./etcdserver/api/v3lock/v3lockpb ./etcdserver/api/v3election/v3electionpb"
# exact version of protoc-gen-gogo to build
GOGO_PROTO_SHA="8d70fb3182befc465c4a1eac8ad4d38ff49778e2"
GRPC_GATEWAY_SHA="84398b94e188ee336f307779b57b3aa91af7063c"
GOGO_PROTO_SHA="100ba4e885062801d56799d78530b73b178a78f3"
GRPC_GATEWAY_SHA="18d159699f2e83fc5bb9ef2f79465ca3f3122676"
# set up self-contained GOPATH for building
export GOPATH=${PWD}/gopath.proto
@@ -63,6 +62,7 @@ for dir in ${DIRS}; do
sed -i.bak -E 's/import _ \"gogoproto\"//g' *.pb.go
sed -i.bak -E 's/import fmt \"fmt\"//g' *.pb.go
sed -i.bak -E 's/import _ \"github\.com\/coreos\/google\/api\"//g' *.pb.go
sed -i.bak -E 's/import _ \"google\.golang\.org\/genproto\/googleapis\/api\/annotations\"//g' *.pb.go
rm -f *.bak
goimports -w *.pb.go
popd