From a4001afbd623c8c47fdcb95789bec27f3c1af877 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 23 Jul 2020 02:47:18 +0530 Subject: [PATCH] Remove update_extension from linux.sh --- __tests__/extensions.test.ts | 1 - dist/index.js | 8 -------- src/extensions.ts | 8 -------- src/scripts/linux.sh | 15 --------------- 4 files changed, 32 deletions(-) diff --git a/__tests__/extensions.test.ts b/__tests__/extensions.test.ts index 4c259209..369c3170 100644 --- a/__tests__/extensions.test.ts +++ b/__tests__/extensions.test.ts @@ -65,7 +65,6 @@ describe('Extension tests', () => { '7.4', 'linux' ); - expect(linux).toContain('update_extension xdebug 2.9.6'); expect(linux).toContain( 'add_extension_from_source xdebug xdebug/xdebug master --enable-xdebug zend_extension' ); diff --git a/dist/index.js b/dist/index.js index d11cf2a2..65491e2e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3916,14 +3916,6 @@ async function addExtensionLinux(extension_csv, version, pipe) { extension = 'xdebug'; command = command_prefix + version + '-' + extension + pipe; break; - // match 7.1xdebug..7.4xdebug - case /^7\.[1-4]xdebug$/.test(version_extension): - add_script += - '\nupdate_extension xdebug 2.9.6' + - pipe + - '\n' + - (await utils.addLog('$tick', 'xdebug', 'Enabled', 'linux')); - return; // match pdo extensions case /.*pdo[_-].*/.test(version_extension): extension = extension diff --git a/src/extensions.ts b/src/extensions.ts index e694d994..37ad4bcf 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -367,14 +367,6 @@ export async function addExtensionLinux( extension = 'xdebug'; command = command_prefix + version + '-' + extension + pipe; break; - // match 7.1xdebug..7.4xdebug - case /^7\.[1-4]xdebug$/.test(version_extension): - add_script += - '\nupdate_extension xdebug 2.9.6' + - pipe + - '\n' + - (await utils.addLog('$tick', 'xdebug', 'Enabled', 'linux')); - return; // match pdo extensions case /.*pdo[_-].*/.test(version_extension): extension = extension diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 2f4770ef..bb52f434 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -208,21 +208,6 @@ add_unstable_extension() { add_pecl_extension "$extension" "$pecl_version" "$prefix" } -# Function to update extension. -update_extension() { - extension=$1 - latest_version=$2 - current_version=$(php -r "echo phpversion('$extension');") - final_version=$(printf "%s\n%s" "$current_version" "$latest_version" | sort | tail -n 1) - if [ "$final_version" != "$current_version" ]; then - version_exists=$(apt-cache policy -- *"$extension" | grep "$final_version") - if [ -z "$version_exists" ]; then - update_lists - fi - $apt_install php"$version"-"$extension" - fi -} - # Function to install extension from source add_extension_from_source() { extension=$1