From b44e5e009fa7f99378ce02ddb5cba90a2e5da2a8 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 20 Jan 2020 21:07:51 +0530 Subject: [PATCH] Use ppa:ondrej/php for phalcon except for PHP7.4 --- __tests__/extensions.test.ts | 16 ++-------------- dist/index.js | 4 ++-- src/extensions.ts | 4 ++-- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/__tests__/extensions.test.ts b/__tests__/extensions.test.ts index a89ed03f..b17043a8 100644 --- a/__tests__/extensions.test.ts +++ b/__tests__/extensions.test.ts @@ -41,22 +41,10 @@ describe('Extension tests', () => { linux = await extensions.addExtension('gearman', '7.1', 'linux'); expect(linux).toContain('gearman.sh 7.1'); - linux = await extensions.addExtension( - 'phalcon3, phalcon4, gearman', - '7.2', - 'linux' - ); - expect(linux).toContain('phalcon.sh phalcon3 7.2'); - expect(linux).toContain('phalcon.sh phalcon4 7.2'); + linux = await extensions.addExtension('gearman', '7.2', 'linux'); expect(linux).toContain('gearman.sh 7.2'); - linux = await extensions.addExtension( - 'phalcon3, phalcon4, gearman', - '7.3', - 'linux' - ); - expect(linux).toContain('phalcon.sh phalcon3 7.3'); - expect(linux).toContain('phalcon.sh phalcon4 7.3'); + linux = await extensions.addExtension('gearman', '7.3', 'linux'); expect(linux).toContain('gearman.sh 7.3'); linux = await extensions.addExtension('phalcon4, gearman', '7.4', 'linux'); diff --git a/dist/index.js b/dist/index.js index 82270d74..3f0f69c6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2676,8 +2676,8 @@ function addExtensionLinux(extension_csv, version, pipe) { '\n' + (yield utils.addLog('$tick', 'xdebug', 'Enabled', 'linux')); return; - // match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4 - case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): + // match 7.4phalcon4 + case /^7.4phalcon4$/.test(version_extension): script += '\nsh ' + path.join(__dirname, '../src/scripts/ext/phalcon.sh') + diff --git a/src/extensions.ts b/src/extensions.ts index dba19eda..137a256e 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -129,8 +129,8 @@ export async function addExtensionLinux( '\n' + (await utils.addLog('$tick', 'xdebug', 'Enabled', 'linux')); return; - // match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4 - case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): + // match 7.4phalcon4 + case /^7.4phalcon4$/.test(version_extension): script += '\nsh ' + path.join(__dirname, '../src/scripts/ext/phalcon.sh') +