ceph-csi/vendor/google.golang.org/grpc/balancer/grpclb/regenerate.sh

34 lines
993 B
Bash
Raw Normal View History

2018-01-09 18:57:14 +00:00
#!/bin/bash
2018-07-18 14:47:22 +00:00
# Copyright 2018 gRPC authors.
2018-01-09 18:57:14 +00:00
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
2018-07-18 14:47:22 +00:00
# http://www.apache.org/licenses/LICENSE-2.0
2018-01-09 18:57:14 +00:00
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
2018-07-18 14:47:22 +00:00
set -eux -o pipefail
TMP=$(mktemp -d)
2018-01-09 18:57:14 +00:00
2018-07-18 14:47:22 +00:00
function finish {
rm -rf "$TMP"
}
trap finish EXIT
2018-01-09 18:57:14 +00:00
2018-07-18 14:47:22 +00:00
pushd "$TMP"
mkdir -p grpc/lb/v1
curl https://raw.githubusercontent.com/grpc/grpc-proto/master/grpc/lb/v1/load_balancer.proto > grpc/lb/v1/load_balancer.proto
2018-01-09 18:57:14 +00:00
2018-07-18 14:47:22 +00:00
protoc --go_out=plugins=grpc,paths=source_relative:. -I. grpc/lb/v1/*.proto
popd
rm -f grpc_lb_v1/*.pb.go
cp "$TMP"/grpc/lb/v1/*.pb.go grpc_lb_v1/
2018-01-09 18:57:14 +00:00