updateproto.sh 499 B

12345678910111213141516
  1. export GOPATH=$PWD
  2. export PATH=$PATH:$PWD/bin
  3. export GOBIN=$PWD/bin
  4. export RPC_PATH=$PWD/remotecontrol
  5. go get github.com/golang/protobuf/protoc-gen-go
  6. go install ./src/github.com/golang/protobuf/protoc-gen-go
  7. mkdir -p $RPC_PATH
  8. rm -f $RPC_PATH/*.pb.go
  9. protoc -I$RPC_PATH --go_out=plugins=grpc:$RPC_PATH $RPC_PATH/remotecontrol.proto
  10. # Cluster interface
  11. export CUSTER_PATH=$PWD/cluster
  12. rm -f $CUSTER_PATH/*.pb.go
  13. protoc -I$CUSTER_PATH --go_out=plugins=grpc:$CUSTER_PATH $CUSTER_PATH/cluster.proto