Fix parsing 8.1 version

This commit is contained in:
Shivam Mathur
2021-09-02 19:24:08 +05:30
parent e06e40278f
commit da9dadf09c
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -357,7 +357,7 @@ add_composertool() {
# Function to get PHP version in semver format.
php_semver() {
php -v | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+([0-9]+)?)?" | head -n 1
php -v | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+((-?[a-zA-Z]+([0-9]+)?)?){2}" | head -n 1
}
# Function to get the tag for a php version.