Use shivammathur/extensions tap to install vips on macOS

This commit is contained in:
Shivam Mathur 2021-09-09 02:40:49 +05:30
parent b1b8d8367c
commit 1229133602
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 5 additions and 1 deletions

View File

@ -73,7 +73,7 @@ describe('Extension tests', () => {
it('checking addExtensionOnDarwin', async () => {
let darwin: string = await extensions.addExtension(
'Xdebug, pcov, grpc, igbinary, imagick, phalcon3, phalcon4, protobuf, psr, rdkafka, swoole, sqlite, ast-beta',
'Xdebug, pcov, grpc, igbinary, imagick, phalcon3, phalcon4, protobuf, psr, rdkafka, swoole, vips, sqlite, ast-beta',
'7.2',
'darwin'
);
@ -88,6 +88,7 @@ describe('Extension tests', () => {
expect(darwin).toContain('add_brew_extension psr');
expect(darwin).toContain('add_brew_extension rdkafka');
expect(darwin).toContain('add_brew_extension swoole');
expect(darwin).toContain('add_brew_extension vips');
expect(darwin).toContain('pecl_install sqlite3');
expect(darwin).toContain('add_unstable_extension ast beta extension');

1
dist/index.js vendored
View File

@ -233,6 +233,7 @@ async function addExtensionDarwin(extension_csv, version) {
case /(5\.6|7\.[0-4]|8.0)(amqp|grpc|igbinary|imagick|imap|mongodb|msgpack|^(pecl_)?http$|propro|protobuf|psr|raphf|rdkafka|redis|swoole|xdebug|xdebug2|yaml|zmq)/.test(version_extension):
case /(7\.[1-4]|8\.0])pcov/.test(version_extension):
case /^(5\.6|7\.[0-3])phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
case /(7\.[0-4]|8\.0])vips/.test(version_extension):
command = 'add_brew_extension ' + extension_name.replace('pecl_', '');
break;
case /^sqlite$/.test(extension):

View File

@ -32,6 +32,7 @@ export async function addExtensionDarwin(
return;
// match 5.6 to 8.0 amqp, grpc, igbinary, imagick, imap, mongodb, msgpack, pecl_http, propro, protobuf, raphf, rdkafka, redis, swoole, xdebug, xdebug2, yaml, zmq
// match 7.1pcov to 8.0pcov
// match 7.0vips to 8.0vips
case /(5\.6|7\.[0-4]|8.0)(amqp|grpc|igbinary|imagick|imap|mongodb|msgpack|^(pecl_)?http$|propro|protobuf|psr|raphf|rdkafka|redis|swoole|xdebug|xdebug2|yaml|zmq)/.test(
version_extension
):
@ -39,6 +40,7 @@ export async function addExtensionDarwin(
case /^(5\.6|7\.[0-3])phalcon3$|^7\.[2-4]phalcon4$/.test(
version_extension
):
case /(7\.[0-4]|8\.0])vips/.test(version_extension):
command = 'add_brew_extension ' + extension_name.replace('pecl_', '');
break;
// match sqlite