Add support for ast and uopz ubuntu packages

This commit is contained in:
Shivam Mathur 2020-03-30 13:50:20 +05:30
parent d90cd153ee
commit ed557fd2c3
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 11 additions and 1 deletions

View File

@ -49,7 +49,7 @@ describe('Extension tests', () => {
it('checking addExtensionOnLinux', async () => {
let linux: string = await extensions.addExtension(
'Xdebug, pcov, sqlite, ast-beta, pdo_mysql, pdo-odbc, xdebug-alpha, grpc-1.2.3',
'Xdebug, pcov, sqlite, ast, uopz, ast-beta, pdo_mysql, pdo-odbc, xdebug-alpha, grpc-1.2.3',
'7.4',
'linux'
);
@ -58,6 +58,8 @@ describe('Extension tests', () => {
expect(linux).toContain(
'sudo $debconf_fix apt-get install -y php7.4-sqlite3'
);
expect(linux).toContain('sudo $debconf_fix apt-get install -y php-ast');
expect(linux).toContain('sudo $debconf_fix apt-get install -y php-uopz');
expect(linux).toContain('add_unstable_extension ast beta extension');
expect(linux).toContain('add_pdo_extension mysql');
expect(linux).toContain('add_pdo_extension odbc');

4
dist/index.js vendored
View File

@ -2801,6 +2801,10 @@ async function addExtensionLinux(extension_csv, version, pipe) {
extension = extension.replace('pdo_', '').replace('pdo-', '');
script += '\nadd_pdo_extension ' + extension;
return;
// match ast and uopz
case /^(ast|uopz)$/.test(extension):
command = command_prefix + '-' + extension + pipe;
break;
// match sqlite
case /^sqlite$/.test(extension):
extension = 'sqlite3';

View File

@ -281,6 +281,10 @@ export async function addExtensionLinux(
extension = extension.replace('pdo_', '').replace('pdo-', '');
script += '\nadd_pdo_extension ' + extension;
return;
// match ast and uopz
case /^(ast|uopz)$/.test(extension):
command = command_prefix + '-' + extension + pipe;
break;
// match sqlite
case /^sqlite$/.test(extension):
extension = 'sqlite3';