mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Fix icu-intl setup
This commit is contained in:
parent
0c4c4d5441
commit
0741f2b23a
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1974,7 +1974,7 @@ async function addExtensionLinux(extension_csv, version) {
|
||||
case /^(5\.[3-6]|7\.[0-4]|8\.0)blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
|
||||
case /^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test(version_extension):
|
||||
case /^couchbase$|^pdo_oci$|^oci8$|^http|^pecl_http|^pdo_firebird$/.test(extension):
|
||||
case /^(5\.6|7\.[0-4]|8\.0)intl-[\d]+\.[\d]+$/.test(version_extension):
|
||||
case /(?<!5\.[3-5])intl-[\d]+\.[\d]+$/.test(version_extension):
|
||||
case /^(5\.[3-6]|7\.[0-4])(ioncube|geos)$/.test(version_extension):
|
||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
||||
case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension):
|
||||
|
@ -259,7 +259,7 @@ export async function addExtensionLinux(
|
||||
case /^couchbase$|^pdo_oci$|^oci8$|^http|^pecl_http|^pdo_firebird$/.test(
|
||||
extension
|
||||
):
|
||||
case /^(5\.6|7\.[0-4]|8\.0)intl-[\d]+\.[\d]+$/.test(version_extension):
|
||||
case /(?<!5\.[3-5])intl-[\d]+\.[\d]+$/.test(version_extension):
|
||||
case /^(5\.[3-6]|7\.[0-4])(ioncube|geos)$/.test(version_extension):
|
||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
||||
case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension):
|
||||
|
@ -2,7 +2,7 @@
|
||||
install_icu() {
|
||||
icu=$1
|
||||
if [ "$(php -i | grep "ICU version =>" | sed -e "s|.*=> s*||")" != "$icu" ]; then
|
||||
get -q -n /tmp/icu.tar.zst "https://dl.bintray.com/shivammathur/icu4c/icu4c-$icu.tar.zst"
|
||||
get -q -n /tmp/icu.tar.zst "https://github.com/shivammathur/icu-intl/releases/download/icu4c/icu4c-$icu.tar.zst"
|
||||
sudo tar -I zstd -xf /tmp/icu.tar.zst -C /usr/local
|
||||
sudo cp -r /usr/local/icu/lib/* /usr/lib/x86_64-linux-gnu/
|
||||
fi
|
||||
@ -11,12 +11,12 @@ install_icu() {
|
||||
# Function to add ext-intl with the given version of ICU
|
||||
add_intl() {
|
||||
icu=$(echo "$1" | cut -d'-' -f 2)
|
||||
supported_version=$(get -s -n "" https://api.bintray.com/packages/shivammathur/icu4c/icu4c | grep -Po "$icu" | head -n 1)
|
||||
supported_version=$(get -s -n "" https://api.github.com/repos/shivammathur/icu-intl/releases | grep -Po "${icu//./\\.}" | head -n 1)
|
||||
if [ "$icu" != "$supported_version" ]; then
|
||||
add_log "${cross:?}" "intl" "ICU $icu is not supported"
|
||||
else
|
||||
install_icu "$icu" >/dev/null 2>&1
|
||||
get -q -n "${ext_dir:?}/intl.so" "https://dl.bintray.com/shivammathur/icu4c/php${version:?}-intl-$icu.so"
|
||||
get -q -n "${ext_dir:?}/intl.so" "https://github.com/shivammathur/icu-intl/releases/download/intl/php${version:?}-intl-$icu.so"
|
||||
enable_extension intl extension
|
||||
add_extension_log intl "Installed and enabled with ICU $icu"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user