mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-09-03 03:14:06 +07:00
Add fallback to github api for adding intl
This commit is contained in:
@ -12,6 +12,7 @@ install_icu() {
|
|||||||
add_intl() {
|
add_intl() {
|
||||||
icu=$(echo "$1" | cut -d'-' -f 2)
|
icu=$(echo "$1" | cut -d'-' -f 2)
|
||||||
supported_version=$(get -s -n "" https://api.github.com/repos/shivammathur/icu-intl/releases/tags/intl-"$icu" | grep -Po "php${version?}-intl-$icu" | head -n 1)
|
supported_version=$(get -s -n "" https://api.github.com/repos/shivammathur/icu-intl/releases/tags/intl-"$icu" | grep -Po "php${version?}-intl-$icu" | head -n 1)
|
||||||
|
[ -z "$supported_version" ] && supported_version=$(get -s -n "" https://github.com/shivammathur/icu-intl/releases/expanded_assets/intl-"$icu" | grep -Po "php$version-intl-$icu" | head -n 1)
|
||||||
if [ "php$version-intl-$icu" != "$supported_version" ]; then
|
if [ "php$version-intl-$icu" != "$supported_version" ]; then
|
||||||
add_log "${cross:?}" "intl" "ICU $icu is not supported for PHP $version"
|
add_log "${cross:?}" "intl" "ICU $icu is not supported for PHP $version"
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user