mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Fix blackfire extension version to 1.50.0 for PHP 5.3 to 5.6
This commit is contained in:
parent
7e5351f399
commit
0461bf14b2
@ -10,7 +10,11 @@ Function Add-Blackfire() {
|
||||
$no_dot_version = $version.replace('.', '')
|
||||
$extension_version = $extension.split('-')[1]
|
||||
if ($extension_version -notmatch "\S") {
|
||||
$extension_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).probe.php
|
||||
if($version -lt '7.0') {
|
||||
$extension_version = '1.50.0'
|
||||
} else {
|
||||
$extension_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).probe.php
|
||||
}
|
||||
}
|
||||
if (Test-Path $ext_dir\blackfire.dll) {
|
||||
Enable-PhpExtension -Extension blackfire -Path $php_dir
|
||||
|
@ -8,7 +8,11 @@ add_blackfire() {
|
||||
blackfire_ini_file="${pecl_file:-${ini_file[@]}}"
|
||||
if [ ! -e "${ext_dir:?}/blackfire.so" ]; then
|
||||
if [ "$extension_version" = "blackfire" ]; then
|
||||
extension_version=$(get -s -n "" https://blackfire.io/api/v1/releases | grep -Eo 'php":"([0-9]+.[0-9]+.[0-9]+)' | cut -d '"' -f 3)
|
||||
if [[ ${version:?} =~ 5.[3-6] ]]; then
|
||||
extension_version='1.50.0'
|
||||
else
|
||||
extension_version=$(get -s -n "" https://blackfire.io/api/v1/releases | grep -Eo 'php":"([0-9]+.[0-9]+.[0-9]+)' | cut -d '"' -f 3)
|
||||
fi
|
||||
fi
|
||||
get -q -n "${ext_dir:?}/blackfire.so" https://packages.blackfire.io/binaries/blackfire-php/"$extension_version"/blackfire-php-"$platform"_amd64-php-"$no_dot_version".so >/dev/null 2>&1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user