Reduce php calls on Linux and macOS

This commit is contained in:
Shivam Mathur
2022-01-16 12:03:31 +05:30
parent 282305f4d7
commit 9a70be75c2
3 changed files with 13 additions and 10 deletions

View File

@ -119,7 +119,7 @@ configure_php() {
# Function to get PHP version in semver format.
php_semver() {
grep -Eo 'version="[0-9]+(\.[0-9]+){2}((-?[a-zA-Z]+([0-9]+)?)?){2}' "$(command -v php-config)" | cut -d '"' -f 2
grep -Eo 'version="[0-9]+(\.[0-9]+){2}((-?[a-zA-Z]+([0-9]+)?)?){2}' "${php_config:?}" | cut -d '"' -f 2
}
# Function to get the tag for a php version.