mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Fix Blackfire extensions logs when cached
This commit is contained in:
parent
256b466cc4
commit
52d2b3b70b
@ -1,12 +1,13 @@
|
|||||||
# Function to install blackfire extension.
|
# Function to install blackfire extension.
|
||||||
add_blackfire() {
|
add_blackfire() {
|
||||||
extension=$1
|
local extension=$1
|
||||||
version=${version:?}
|
version=${version:?}
|
||||||
no_dot_version=${version/./}
|
no_dot_version=${version/./}
|
||||||
platform=$(uname -s | tr '[:upper:]' '[:lower:]')
|
platform=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||||
extension_version=$(echo "$extension" | cut -d '-' -f 2)
|
extension_version=$(echo "$extension" | cut -d '-' -f 2)
|
||||||
blackfire_ini_file="${pecl_file:-${ini_file[@]}}"
|
status='Enabled'
|
||||||
if ! shared_extension blackfire; then
|
if ! shared_extension blackfire; then
|
||||||
|
status='Installed and enabled'
|
||||||
if [ "$extension_version" = "blackfire" ]; then
|
if [ "$extension_version" = "blackfire" ]; then
|
||||||
if [[ ${version:?} =~ 5.[3-6] ]]; then
|
if [[ ${version:?} =~ 5.[3-6] ]]; then
|
||||||
extension_version='1.50.0'
|
extension_version='1.50.0'
|
||||||
@ -16,6 +17,6 @@ add_blackfire() {
|
|||||||
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"_amd64-php-"$no_dot_version".so >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
echo "extension=blackfire.so" | sudo tee -a "$blackfire_ini_file" >/dev/null 2>&1
|
enable_extension blackfire extension
|
||||||
add_extension_log "$extension-$extension_version" "Installed and enabled"
|
add_extension_log blackfire "$status"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user