scripts: update gogo/protobuf, use 'gofast' plugin

- Fix https://github.com/coreos/etcd/issues/5942
- Partial fix for https://github.com/coreos/etcd/issues/5865
release-3.0
Gyu-Ho Lee 2016-07-18 09:31:27 -07:00
parent debecc1868
commit 4198369dd0
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ fi
DIRS="./wal/walpb ./etcdserver/etcdserverpb ./snap/snappb ./raft/raftpb ./mvcc/mvccpb ./lease/leasepb ./auth/authpb"
# exact version of protoc-gen-gogo to build
GOGO_PROTO_SHA="2752d97bbd91927dd1c43296dbf8700e50e2708c"
GOGO_PROTO_SHA="5f813990bfffa3c2f4414dbea480e705ab280358"
GRPC_GATEWAY_SHA="f52d055dc48aec25854ed7d31862f78913cf17d1"
# set up self-contained GOPATH for building
@ -57,7 +57,7 @@ popd
for dir in ${DIRS}; do
pushd ${dir}
protoc --gogofast_out=plugins=grpc,import_prefix=github.com/coreos/:. -I=.:"${GOGOPROTO_PATH}":"${COREOS_ROOT}":"${GRPC_GATEWAY_ROOT}/third_party/googleapis" *.proto
protoc --gofast_out=plugins=grpc,import_prefix=github.com/coreos/:. -I=.:"${GOGOPROTO_PATH}":"${COREOS_ROOT}":"${GRPC_GATEWAY_ROOT}/third_party/googleapis" *.proto
sed -i.bak -E "s/github\.com\/coreos\/(gogoproto|github\.com|golang\.org|google\.golang\.org)/\1/g" *.pb.go
sed -i.bak -E 's/github\.com\/coreos\/(errors|fmt|io)/\1/g' *.pb.go
sed -i.bak -E 's/import _ \"gogoproto\"//g' *.pb.go