mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 11:18:16 +00:00
Check protoc version strictly
This commit is contained in:
@@ -25,22 +25,14 @@ set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
source "${KUBE_ROOT}/hack/lib/protoc.sh"
|
||||
|
||||
kube::protoc::check_protoc
|
||||
kube::golang::setup_env
|
||||
|
||||
GO111MODULE=on GOPROXY=off go install k8s.io/code-generator/cmd/go-to-protobuf
|
||||
GO111MODULE=on GOPROXY=off go install k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo
|
||||
|
||||
if [[ -z "$(which protoc)" || "$(protoc --version)" != "libprotoc 3."* ]]; then
|
||||
echo "Generating protobuf requires protoc 3.0.0-beta1 or newer. Please download and"
|
||||
echo "install the platform appropriate Protobuf package for your OS: "
|
||||
echo
|
||||
echo " https://github.com/protocolbuffers/protobuf/releases"
|
||||
echo
|
||||
echo "WARNING: Protobuf changes are not being validated"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gotoprotobuf=$(kube::util::find-binary "go-to-protobuf")
|
||||
|
||||
# requires the 'proto' tag to build (will remove when ready)
|
||||
|
||||
Reference in New Issue
Block a user