From 19b09596c6a8b29bb61a034a97c34594ae0eea8b Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 25 Nov 2020 05:32:15 +0530 Subject: [PATCH] Fix fetching extension version from PECL on macOS --- src/scripts/common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/common.sh b/src/scripts/common.sh index 1e9b67ca..be246e17 100644 --- a/src/scripts/common.sh +++ b/src/scripts/common.sh @@ -128,9 +128,9 @@ get_pecl_version() { stability="$(echo "$2" | grep -m 1 -Eio "(alpha|beta|rc|snapshot|preview)")" pecl_rest='https://pecl.php.net/rest/r/' response=$(get -s -n "" "$pecl_rest$extension"/allreleases.xml) - pecl_version=$(echo "$response" | grep -m 1 -Pio "(\d*\.\d*\.\d*$stability\d*)") + pecl_version=$(echo "$response" | grep -m 1 -Eio "([0-9]+\.[0-9]+\.[0-9]+${stability}[0-9]+)") if [ ! "$pecl_version" ]; then - pecl_version=$(echo "$response" | grep -m 1 -Po "(\d*\.\d*\.\d*)") + pecl_version=$(echo "$response" | grep -m 1 -Eo "([0-9]+\.[0-9]+\.[0-9]+)") fi echo "$pecl_version" }