1
0
mirror of https://github.com/halaxa/json-machine.git synced 2025-03-15 17:09:39 +01:00

Build: Fallback to PHP minor version if stable patch version not found via docker hub API

This commit is contained in:
Filip Halaxa 2022-02-05 12:58:28 +01:00
parent db81fe8f20
commit 0904839295

View File

@ -3,8 +3,9 @@
set -e
PHP_MINOR=$1
PHP_VERSION=$(wget -qO- "https://hub.docker.com/v2/repositories/library/php/tags?name=$PHP_MINOR" \
| grep -Po "[0-9]+\.[0-9]+\.[0-9]+" \
PHP_VERSION=$( (wget -qO- "https://hub.docker.com/v2/repositories/library/php/tags?name=$PHP_MINOR" \
| grep -Po "[0-9]+\.[0-9]+\.[0-9]+(?=-)" \
|| echo "$PHP_MINOR") \
| head -1 \
)
XDEBUG_VERSION=$2