From 6652ff4b7f8d9fcd804b3760c439a5d67c71b14b Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 21 Oct 2024 11:59:22 +0200 Subject: [PATCH] Fix osx grep have no -P flag --- hack/pre-checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/pre-checks.sh b/hack/pre-checks.sh index be0e2a67..d8fc94e0 100755 --- a/hack/pre-checks.sh +++ b/hack/pre-checks.sh @@ -5,7 +5,7 @@ RED='\033[31m' RESET='\033[0m' check-yq-version() { - current_version=$(yq -V | grep -oP 'v[0-9]+\.[0-9]+\.[0-9]+') + current_version=$(yq -V | awk '$(NF-1) == "version" {print $NF}') if [ -z "$current_version" ]; then echo "yq is not installed or version cannot be determined." exit 1