Merge pull request #4214 from chaosi-zju/tmp

fix libprotoc version validation error
This commit is contained in:
karmada-bot 2023-11-09 22:00:42 +08:00 committed by GitHub
commit d6e28817c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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