mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-24 12:51:05 +07:00
Fix support for blackfire
This commit is contained in:
parent
606ac25b84
commit
a0edbac27b
@ -8,6 +8,10 @@ add_blackfire() {
|
||||
status='Enabled'
|
||||
if ! shared_extension blackfire; then
|
||||
status='Installed and enabled'
|
||||
arch="$(uname -m)"
|
||||
arch_name="amd64"
|
||||
[[ "$arch" = "aarch64" || "$arch" = "arm64" ]] && arch_name="arm64"
|
||||
[ "${ts:?}" = 'zts' ] && no_dot_version="${no_dot_version}-zts"
|
||||
if [ "$extension_version" = "blackfire" ]; then
|
||||
if [[ ${version:?} =~ 5.[3-6] ]]; then
|
||||
extension_version='1.50.0'
|
||||
@ -15,10 +19,14 @@ add_blackfire() {
|
||||
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
|
||||
get -q -n "${ext_dir:?}/blackfire.so" https://packages.blackfire.io/binaries/blackfire-php/"$extension_version"/blackfire-php-"$platform"_"$arch_name"-php-"$no_dot_version".so >/dev/null 2>&1
|
||||
fi
|
||||
if [ -e "${ext_dir:?}/blackfire.so" ]; then
|
||||
disable_extension xdebug >/dev/null 2>&1
|
||||
disable_extension pcov >/dev/null 2>&1
|
||||
enable_extension blackfire extension
|
||||
add_extension_log blackfire "$status"
|
||||
else
|
||||
add_extension_log blackfire "Could not install blackfire on PHP ${semver:?}"
|
||||
fi
|
||||
disable_extension xdebug >/dev/null 2>&1
|
||||
disable_extension pcov >/dev/null 2>&1
|
||||
enable_extension blackfire extension
|
||||
add_extension_log blackfire "$status"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user