Add PECL support on linux

This commit is contained in:
Shivam Mathur
2019-11-07 11:11:35 +05:30
parent 24ecbee4ea
commit e14155415a
9 changed files with 73 additions and 28 deletions

View File

@ -192,10 +192,12 @@ function addExtensionLinux(extension_csv, version) {
break;
default:
install_command =
'sudo DEBIAN_FRONTEND=noninteractive apt install -y php' +
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php' +
version +
'-' +
extension +
' >/dev/null 2>&1 || sudo pecl install ' +
extension +
' >/dev/null 2>&1';
break;
}

View File

@ -61,10 +61,14 @@ function run() {
let script_path = '';
switch (os_version) {
case 'darwin':
case 'linux':
script_path = yield build(os_version + '.sh', version, os_version);
yield exec_1.exec('sh ' + script_path + ' ' + version + ' ' + __dirname);
break;
case 'linux':
let pecl = yield utils.getInput('pecl', false);
script_path = yield build(os_version + '.sh', version, os_version);
yield exec_1.exec('sh ' + script_path + ' ' + version + ' ' + pecl);
break;
case 'win32':
script_path = yield build('win32.ps1', version, os_version);
yield exec_1.exec('pwsh ' + script_path + ' -version ' + version + ' -dir ' + __dirname);