mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Fix extensions.ts
This commit is contained in:
parent
88fb99b592
commit
65ccfb36dc
@ -91,6 +91,9 @@ describe('Extension tests', () => {
|
|||||||
darwin = await extensions.addExtension('xdebug', '5.6', 'darwin');
|
darwin = await extensions.addExtension('xdebug', '5.6', 'darwin');
|
||||||
expect(darwin).toContain('sudo pecl install xdebug-2.5.5');
|
expect(darwin).toContain('sudo pecl install xdebug-2.5.5');
|
||||||
|
|
||||||
|
darwin = await extensions.addExtension('xdebug', '7.0', 'darwin');
|
||||||
|
expect(darwin).toContain('sudo pecl install xdebug-2.9.0');
|
||||||
|
|
||||||
darwin = await extensions.addExtension('xdebug', '7.2', 'darwin');
|
darwin = await extensions.addExtension('xdebug', '7.2', 'darwin');
|
||||||
expect(darwin).toContain('sudo pecl install xdebug');
|
expect(darwin).toContain('sudo pecl install xdebug');
|
||||||
|
|
||||||
|
9
dist/index.js
vendored
9
dist/index.js
vendored
@ -2537,6 +2537,9 @@ function addExtensionDarwin(extension_csv, version, pipe) {
|
|||||||
case /5\.6xdebug/.test(version_extension):
|
case /5\.6xdebug/.test(version_extension):
|
||||||
install_command = 'sudo pecl install xdebug-2.5.5' + pipe;
|
install_command = 'sudo pecl install xdebug-2.5.5' + pipe;
|
||||||
break;
|
break;
|
||||||
|
case /7\.0xdebug/.test(version_extension):
|
||||||
|
install_command = 'sudo pecl install xdebug-2.9.0' + pipe;
|
||||||
|
break;
|
||||||
case /5\.6redis/.test(version_extension):
|
case /5\.6redis/.test(version_extension):
|
||||||
install_command = 'sudo pecl install redis-2.2.8' + pipe;
|
install_command = 'sudo pecl install redis-2.2.8' + pipe;
|
||||||
break;
|
break;
|
||||||
@ -2633,11 +2636,11 @@ function addExtensionLinux(extension_csv, version, pipe) {
|
|||||||
break;
|
break;
|
||||||
// match 7.0xdebug..7.4xdebug
|
// match 7.0xdebug..7.4xdebug
|
||||||
case /^7\.[0-4]xdebug$/.test(version_extension):
|
case /^7\.[0-4]xdebug$/.test(version_extension):
|
||||||
script = '\nupdate_extension xdebug 2.9.0' + pipe;
|
script += '\nupdate_extension xdebug 2.9.0' + pipe;
|
||||||
return;
|
return;
|
||||||
// match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
// match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
||||||
install_command =
|
script +=
|
||||||
'sh ' +
|
'sh ' +
|
||||||
path.join(__dirname, '../src/scripts/ext/phalcon.sh') +
|
path.join(__dirname, '../src/scripts/ext/phalcon.sh') +
|
||||||
' ' +
|
' ' +
|
||||||
@ -2645,7 +2648,7 @@ function addExtensionLinux(extension_csv, version, pipe) {
|
|||||||
' ' +
|
' ' +
|
||||||
version +
|
version +
|
||||||
pipe;
|
pipe;
|
||||||
break;
|
return;
|
||||||
default:
|
default:
|
||||||
install_command =
|
install_command =
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php' +
|
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php' +
|
||||||
|
@ -24,6 +24,9 @@ export async function addExtensionDarwin(
|
|||||||
case /5\.6xdebug/.test(version_extension):
|
case /5\.6xdebug/.test(version_extension):
|
||||||
install_command = 'sudo pecl install xdebug-2.5.5' + pipe;
|
install_command = 'sudo pecl install xdebug-2.5.5' + pipe;
|
||||||
break;
|
break;
|
||||||
|
case /7\.0xdebug/.test(version_extension):
|
||||||
|
install_command = 'sudo pecl install xdebug-2.9.0' + pipe;
|
||||||
|
break;
|
||||||
case /5\.6redis/.test(version_extension):
|
case /5\.6redis/.test(version_extension):
|
||||||
install_command = 'sudo pecl install redis-2.2.8' + pipe;
|
install_command = 'sudo pecl install redis-2.2.8' + pipe;
|
||||||
break;
|
break;
|
||||||
@ -120,11 +123,11 @@ export async function addExtensionLinux(
|
|||||||
break;
|
break;
|
||||||
// match 7.0xdebug..7.4xdebug
|
// match 7.0xdebug..7.4xdebug
|
||||||
case /^7\.[0-4]xdebug$/.test(version_extension):
|
case /^7\.[0-4]xdebug$/.test(version_extension):
|
||||||
script = '\nupdate_extension xdebug 2.9.0' + pipe;
|
script += '\nupdate_extension xdebug 2.9.0' + pipe;
|
||||||
return;
|
return;
|
||||||
// match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
// match 7.0phalcon3..7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
||||||
install_command =
|
script +=
|
||||||
'sh ' +
|
'sh ' +
|
||||||
path.join(__dirname, '../src/scripts/ext/phalcon.sh') +
|
path.join(__dirname, '../src/scripts/ext/phalcon.sh') +
|
||||||
' ' +
|
' ' +
|
||||||
@ -132,7 +135,7 @@ export async function addExtensionLinux(
|
|||||||
' ' +
|
' ' +
|
||||||
version +
|
version +
|
||||||
pipe;
|
pipe;
|
||||||
break;
|
return;
|
||||||
default:
|
default:
|
||||||
install_command =
|
install_command =
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php' +
|
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php' +
|
||||||
|
Loading…
Reference in New Issue
Block a user