From c0c3e17033ddf2c93460821baebea861d3f6364b Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 21 Oct 2024 11:59:56 +0200 Subject: [PATCH] Fix osx grep have no -P flag (#438) --- 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