Use shivammathur/extensions tap for grpc, swoole, protobuf on macos

This commit is contained in:
Shivam Mathur 2020-07-03 15:06:42 +05:30
parent a74c3369c5
commit be3ee05178
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 16 additions and 13 deletions

View File

@ -85,12 +85,15 @@ describe('Extension tests', () => {
it('checking addExtensionOnDarwin', async () => { it('checking addExtensionOnDarwin', async () => {
let darwin: string = await extensions.addExtension( let darwin: string = await extensions.addExtension(
'Xdebug, pcov, sqlite, ast-beta', 'Xdebug, pcov, grpc, protobuf, swoole, sqlite, ast-beta',
'7.2', '7.2',
'darwin' 'darwin'
); );
expect(darwin).toContain('add_brew_extension xdebug'); expect(darwin).toContain('add_brew_extension xdebug');
expect(darwin).toContain('add_brew_extension pcov'); expect(darwin).toContain('add_brew_extension pcov');
expect(darwin).toContain('add_brew_extension grpc');
expect(darwin).toContain('add_brew_extension protobuf');
expect(darwin).toContain('add_brew_extension swoole');
expect(darwin).toContain('sudo pecl install -f sqlite3'); expect(darwin).toContain('sudo pecl install -f sqlite3');
expect(darwin).toContain('add_unstable_extension ast beta extension'); expect(darwin).toContain('add_unstable_extension ast beta extension');

12
dist/index.js vendored
View File

@ -2696,13 +2696,13 @@ async function addExtensionDarwin(extension_csv, version, pipe) {
' ' + ' ' +
ext_prefix; ext_prefix;
return; return;
// match 5.6xdebug, 7.0xdebug...7.4xdebug, 8.0xdebug // match 5.6xdebug to 8.0xdebug, 5.6swoole to 8.0swoole
case /(5\.6|7\.[0-4]|8\.[0-9])xdebug/.test(version_extension): // match 5.6grpc to 7.4grpc, 5.6protobuf to 7.4protobuf
command = 'add_brew_extension xdebug'; // match 7.1pcov to 8.0pcov
break; case /(5\.6|7\.[0-4]|8\.[0-9])(xdebug|swoole)/.test(version_extension):
// match 7.1pcov...7.4pcov, 8.0pcov case /(5\.6|7\.[0-4])(grpc|protobuf)/.test(version_extension):
case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension): case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension):
command = 'add_brew_extension pcov'; command = 'add_brew_extension ' + extension_name;
break; break;
// match 5.6redis // match 5.6redis
case /5\.6redis/.test(version_extension): case /5\.6redis/.test(version_extension):

View File

@ -50,13 +50,13 @@ export async function addExtensionDarwin(
' ' + ' ' +
ext_prefix; ext_prefix;
return; return;
// match 5.6xdebug, 7.0xdebug...7.4xdebug, 8.0xdebug // match 5.6xdebug to 8.0xdebug, 5.6swoole to 8.0swoole
case /(5\.6|7\.[0-4]|8\.[0-9])xdebug/.test(version_extension): // match 5.6grpc to 7.4grpc, 5.6protobuf to 7.4protobuf
command = 'add_brew_extension xdebug'; // match 7.1pcov to 8.0pcov
break; case /(5\.6|7\.[0-4]|8\.[0-9])(xdebug|swoole)/.test(version_extension):
// match 7.1pcov...7.4pcov, 8.0pcov case /(5\.6|7\.[0-4])(grpc|protobuf)/.test(version_extension):
case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension): case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension):
command = 'add_brew_extension pcov'; command = 'add_brew_extension ' + extension_name;
break; break;
// match 5.6redis // match 5.6redis
case /5\.6redis/.test(version_extension): case /5\.6redis/.test(version_extension):