From 619c65922a5c1ac946dc506563ac61659ee0d456 Mon Sep 17 00:00:00 2001 From: chaosi-zju Date: Thu, 9 Nov 2023 16:50:17 +0800 Subject: [PATCH] fix libprotoc version validation error Signed-off-by: chaosi-zju --- hack/update-estimator-protobuf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/update-estimator-protobuf.sh b/hack/update-estimator-protobuf.sh index fe32a4df7..a0568a1d3 100755 --- a/hack/update-estimator-protobuf.sh +++ b/hack/update-estimator-protobuf.sh @@ -17,7 +17,7 @@ GO111MODULE=on go install github.com/gogo/protobuf/protoc-gen-gogo GO111MODULE=on go install github.com/vektra/mockery/v2 #ref https://github.com/kubernetes/kubernetes/blob/master/hack/update-generated-protobuf-dockerized.sh -if [[ -z "$(which protoc)" || "$(protoc --version)" != "libprotoc 3."* ]]; then +if [[ -z "$(which protoc)" || $(protoc --version | sed -r "s/libprotoc ([0-9]+).*/\1/g") -lt 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