mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Update old Xdebug version for coverage: xdebug
This commit is contained in:
parent
2ee4653d1c
commit
bd214a2dca
@ -30,10 +30,7 @@ describe('Extension tests', () => {
|
|||||||
'7.4',
|
'7.4',
|
||||||
'linux'
|
'linux'
|
||||||
);
|
);
|
||||||
expect(linux).toContain(
|
expect(linux).toContain('update_extension xdebug 2.9.0');
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-xdebug'
|
|
||||||
);
|
|
||||||
expect(linux).toContain('pecl install xdebug');
|
|
||||||
expect(linux).toContain(
|
expect(linux).toContain(
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-pcov'
|
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-pcov'
|
||||||
);
|
);
|
||||||
|
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -2631,6 +2631,10 @@ function addExtensionLinux(extension_csv, version, pipe) {
|
|||||||
version +
|
version +
|
||||||
pipe;
|
pipe;
|
||||||
break;
|
break;
|
||||||
|
// match 7.0xdebug..7.4xdebug
|
||||||
|
case /^7\.[0-4]xdebug$/.test(version_extension):
|
||||||
|
script = '\nupdate_extension xdebug 2.9.0' + pipe;
|
||||||
|
return;
|
||||||
// match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
// match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
||||||
install_command =
|
install_command =
|
||||||
|
@ -118,6 +118,10 @@ export async function addExtensionLinux(
|
|||||||
version +
|
version +
|
||||||
pipe;
|
pipe;
|
||||||
break;
|
break;
|
||||||
|
// match 7.0xdebug..7.4xdebug
|
||||||
|
case /^7\.[0-4]xdebug$/.test(version_extension):
|
||||||
|
script = '\nupdate_extension xdebug 2.9.0' + pipe;
|
||||||
|
return;
|
||||||
// match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
// match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
||||||
install_command =
|
install_command =
|
||||||
|
@ -51,6 +51,21 @@ remove_extension() {
|
|||||||
sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1
|
sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to update extension
|
||||||
|
update_extension() {
|
||||||
|
extension=$1
|
||||||
|
latest_version=$2
|
||||||
|
current_version=$(php -r "echo phpversion('$extension');")
|
||||||
|
final_version=$(printf "%s\n%s" "$current_version" "$latest_version" | sort | tail -n 1)
|
||||||
|
if [ "$final_version" != "$current_version" ]; then
|
||||||
|
version_exists=$(apt-cache policy -- *"$extension" | grep "$final_version")
|
||||||
|
if [ -z "$version_exists" ]; then
|
||||||
|
update_ppa
|
||||||
|
fi
|
||||||
|
$apt_install php"$version"-"$extension"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Function to setup a remote tool
|
# Function to setup a remote tool
|
||||||
add_tool() {
|
add_tool() {
|
||||||
url=$1
|
url=$1
|
||||||
|
Loading…
Reference in New Issue
Block a user