mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Check if the extensions has to be built from source first
This commit is contained in:
parent
cc316409b0
commit
c342ca379e
24
dist/index.js
vendored
24
dist/index.js
vendored
@ -1811,6 +1811,12 @@ async function addExtensionDarwin(extension_csv, version) {
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
||||
return;
|
||||
// match extensions from GitHub. Do this before checking for semver as
|
||||
// the version may match that as well
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
matches = /.+-(.+)\/(.+)@(.+)/.exec(extension);
|
||||
add_script += await utils.joins('\nadd_extension_from_github', ext_name, matches[1], matches[2], matches[3], ext_prefix);
|
||||
return;
|
||||
// match 5.3blackfire...8.0blackfire
|
||||
// match 5.3blackfire-(semver)...8.0blackfire-(semver)
|
||||
// match couchbase, pdo_oci, oci8, http, pecl_http
|
||||
@ -1826,12 +1832,6 @@ async function addExtensionDarwin(extension_csv, version) {
|
||||
case /.+-(stable|beta|alpha|devel|snapshot|rc|preview)/.test(extension):
|
||||
add_script += await utils.joins('\nadd_unstable_extension', ext_name, ext_version, ext_prefix);
|
||||
return;
|
||||
// match extensions from GitHub. Do this before checking for semver as
|
||||
// the version may match that as well
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
matches = /.+-(.+)\/(.+)@(.+)/.exec(extension);
|
||||
add_script += await utils.joins('\nadd_extension_from_github', ext_name, matches[1], matches[2], matches[3], ext_prefix);
|
||||
return;
|
||||
// match semver
|
||||
case /.+-\d+\.\d+\.\d+.*/.test(extension):
|
||||
add_script += await utils.joins('\nadd_pecl_extension', ext_name, ext_version, ext_prefix);
|
||||
@ -1964,6 +1964,12 @@ async function addExtensionLinux(extension_csv, version) {
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
||||
return;
|
||||
// match extensions from GitHub. Do this before checking for semver as
|
||||
// the version may match that as well
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
matches = /.+-(.+)\/(.+)@(.+)/.exec(extension);
|
||||
add_script += await utils.joins('\nadd_extension_from_github', ext_name, matches[1], matches[2], matches[3], ext_prefix);
|
||||
return;
|
||||
// match 5.3blackfire...8.0blackfire
|
||||
// match 5.3blackfire-(semver)...8.0blackfire-(semver)
|
||||
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
|
||||
@ -1984,12 +1990,6 @@ async function addExtensionLinux(extension_csv, version) {
|
||||
case /.+-(stable|beta|alpha|devel|snapshot|rc|preview)/.test(extension):
|
||||
add_script += await utils.joins('\nadd_unstable_extension', ext_name, ext_version, ext_prefix);
|
||||
return;
|
||||
// match extensions from GitHub. Do this before checking for semver as
|
||||
// the version may match that as well
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
matches = /.+-(.+)\/(.+)@(.+)/.exec(extension);
|
||||
add_script += await utils.joins('\nadd_extension_from_github', ext_name, matches[1], matches[2], matches[3], ext_prefix);
|
||||
return;
|
||||
// match semver versions
|
||||
case /.+-\d+\.\d+\.\d+.*/.test(extension):
|
||||
add_script += await utils.joins('\nadd_pecl_extension', ext_name, ext_version, ext_prefix);
|
||||
|
@ -24,6 +24,19 @@ export async function addExtensionDarwin(
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
||||
return;
|
||||
// match extensions from GitHub. Do this before checking for semver as
|
||||
// the version may match that as well
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
matches = /.+-(.+)\/(.+)@(.+)/.exec(extension) as RegExpExecArray;
|
||||
add_script += await utils.joins(
|
||||
'\nadd_extension_from_github',
|
||||
ext_name,
|
||||
matches[1],
|
||||
matches[2],
|
||||
matches[3],
|
||||
ext_prefix
|
||||
);
|
||||
return;
|
||||
// match 5.3blackfire...8.0blackfire
|
||||
// match 5.3blackfire-(semver)...8.0blackfire-(semver)
|
||||
// match couchbase, pdo_oci, oci8, http, pecl_http
|
||||
@ -53,19 +66,6 @@ export async function addExtensionDarwin(
|
||||
ext_prefix
|
||||
);
|
||||
return;
|
||||
// match extensions from GitHub. Do this before checking for semver as
|
||||
// the version may match that as well
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
matches = /.+-(.+)\/(.+)@(.+)/.exec(extension) as RegExpExecArray;
|
||||
add_script += await utils.joins(
|
||||
'\nadd_extension_from_github',
|
||||
ext_name,
|
||||
matches[1],
|
||||
matches[2],
|
||||
matches[3],
|
||||
ext_prefix
|
||||
);
|
||||
return;
|
||||
// match semver
|
||||
case /.+-\d+\.\d+\.\d+.*/.test(extension):
|
||||
add_script += await utils.joins(
|
||||
@ -243,6 +243,19 @@ export async function addExtensionLinux(
|
||||
case /^:/.test(ext_name):
|
||||
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
||||
return;
|
||||
// match extensions from GitHub. Do this before checking for semver as
|
||||
// the version may match that as well
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
matches = /.+-(.+)\/(.+)@(.+)/.exec(extension) as RegExpExecArray;
|
||||
add_script += await utils.joins(
|
||||
'\nadd_extension_from_github',
|
||||
ext_name,
|
||||
matches[1],
|
||||
matches[2],
|
||||
matches[3],
|
||||
ext_prefix
|
||||
);
|
||||
return;
|
||||
// match 5.3blackfire...8.0blackfire
|
||||
// match 5.3blackfire-(semver)...8.0blackfire-(semver)
|
||||
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
|
||||
@ -279,19 +292,6 @@ export async function addExtensionLinux(
|
||||
ext_prefix
|
||||
);
|
||||
return;
|
||||
// match extensions from GitHub. Do this before checking for semver as
|
||||
// the version may match that as well
|
||||
case /.+-.+\/.+@.+/.test(extension):
|
||||
matches = /.+-(.+)\/(.+)@(.+)/.exec(extension) as RegExpExecArray;
|
||||
add_script += await utils.joins(
|
||||
'\nadd_extension_from_github',
|
||||
ext_name,
|
||||
matches[1],
|
||||
matches[2],
|
||||
matches[3],
|
||||
ext_prefix
|
||||
);
|
||||
return;
|
||||
// match semver versions
|
||||
case /.+-\d+\.\d+\.\d+.*/.test(extension):
|
||||
add_script += await utils.joins(
|
||||
|
Loading…
Reference in New Issue
Block a user