Fix versioned extensions

This commit is contained in:
Shivam Mathur
2020-02-23 19:00:40 +05:30
parent 9d77946f60
commit 9b297384e1
5 changed files with 110 additions and 84 deletions

View File

@ -32,6 +32,11 @@ export async function addExtensionDarwin(
' ' +
prefix;
return;
// match exact versions
case /.*-\d+\.\d+\.\d+.*/.test(version_extension):
script +=
'\nadd_pecl_extension ' + ext_name + ' ' + ext_version + ' ' + prefix;
return;
case /5\.3xdebug/.test(version_extension):
install_command = 'sudo pecl install -f xdebug-2.2.7' + pipe;
break;
@ -69,7 +74,7 @@ export async function addExtensionDarwin(
}
script +=
'\nadd_extension ' +
ext_name +
extension +
' "' +
install_command +
'" ' +
@ -167,7 +172,8 @@ export async function addExtensionLinux(
return;
// match exact versions
case /.*-\d+\.\d+\.\d+.*/.test(version_extension):
script += '\nadd_pecl_extension ' + ext_name + ' ' + ext_version;
script +=
'\nadd_pecl_extension ' + ext_name + ' ' + ext_version + ' ' + prefix;
return;
// match 5.6gearman..7.4gearman
case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension):