diff --git a/raft/raftpb/genproto.sh b/raft/raftpb/genproto.sh index 39dc53a6c..1aabc60c2 100755 --- a/raft/raftpb/genproto.sh +++ b/raft/raftpb/genproto.sh @@ -1 +1,8 @@ -exec protoc --gogo_out=. -I=.:$GOPATH/src/code.google.com/p/gogoprotobuf/protobuf:$GOPATH/src *.proto +set -e +protoc --gogo_out=. -I=.:$GOPATH/src/code.google.com/p/gogoprotobuf/protobuf:$GOPATH/src *.proto + +prefix=github.com/coreos/etcd/third_party +sed \ + -i'.bak' \ + "s|code.google.com/p/gogoprotobuf/proto|$prefix/code.google.com/p/gogoprotobuf/proto|" *.go +rm *.bak diff --git a/raft/raftpb/raft.pb.go b/raft/raftpb/raft.pb.go index 482afbc6e..1be37ef4d 100644 --- a/raft/raftpb/raft.pb.go +++ b/raft/raftpb/raft.pb.go @@ -17,14 +17,14 @@ */ package raftpb -import proto "code.google.com/p/gogoprotobuf/proto" +import proto "github.com/coreos/etcd/third_party/code.google.com/p/gogoprotobuf/proto" import json "encoding/json" import math "math" // discarding unused import gogoproto "code.google.com/p/gogoprotobuf/gogoproto/gogo.pb" import io "io" -import code_google_com_p_gogoprotobuf_proto "code.google.com/p/gogoprotobuf/proto" +import code_google_com_p_gogoprotobuf_proto "github.com/coreos/etcd/third_party/code.google.com/p/gogoprotobuf/proto" // Reference proto, json, and math imports to suppress error if they are not otherwise used. var _ = proto.Marshal