Check if the extensions has to be built from source first

This commit is contained in:
Shivam Mathur 2021-03-11 07:29:43 +05:30
parent cc316409b0
commit c342ca379e
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 38 additions and 38 deletions

24
dist/index.js vendored
View File

@ -1811,6 +1811,12 @@ async function addExtensionDarwin(extension_csv, version) {
case /^:/.test(ext_name): case /^:/.test(ext_name):
remove_script += '\nremove_extension ' + ext_name.slice(1); remove_script += '\nremove_extension ' + ext_name.slice(1);
return; 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...8.0blackfire
// match 5.3blackfire-(semver)...8.0blackfire-(semver) // match 5.3blackfire-(semver)...8.0blackfire-(semver)
// match couchbase, pdo_oci, oci8, http, pecl_http // 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): case /.+-(stable|beta|alpha|devel|snapshot|rc|preview)/.test(extension):
add_script += await utils.joins('\nadd_unstable_extension', ext_name, ext_version, ext_prefix); add_script += await utils.joins('\nadd_unstable_extension', ext_name, ext_version, ext_prefix);
return; 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 // match semver
case /.+-\d+\.\d+\.\d+.*/.test(extension): case /.+-\d+\.\d+\.\d+.*/.test(extension):
add_script += await utils.joins('\nadd_pecl_extension', ext_name, ext_version, ext_prefix); 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): case /^:/.test(ext_name):
remove_script += '\nremove_extension ' + ext_name.slice(1); remove_script += '\nremove_extension ' + ext_name.slice(1);
return; 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...8.0blackfire
// match 5.3blackfire-(semver)...8.0blackfire-(semver) // match 5.3blackfire-(semver)...8.0blackfire-(semver)
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid // 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): case /.+-(stable|beta|alpha|devel|snapshot|rc|preview)/.test(extension):
add_script += await utils.joins('\nadd_unstable_extension', ext_name, ext_version, ext_prefix); add_script += await utils.joins('\nadd_unstable_extension', ext_name, ext_version, ext_prefix);
return; 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 // match semver versions
case /.+-\d+\.\d+\.\d+.*/.test(extension): case /.+-\d+\.\d+\.\d+.*/.test(extension):
add_script += await utils.joins('\nadd_pecl_extension', ext_name, ext_version, ext_prefix); add_script += await utils.joins('\nadd_pecl_extension', ext_name, ext_version, ext_prefix);

View File

@ -24,6 +24,19 @@ export async function addExtensionDarwin(
case /^:/.test(ext_name): case /^:/.test(ext_name):
remove_script += '\nremove_extension ' + ext_name.slice(1); remove_script += '\nremove_extension ' + ext_name.slice(1);
return; 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...8.0blackfire
// match 5.3blackfire-(semver)...8.0blackfire-(semver) // match 5.3blackfire-(semver)...8.0blackfire-(semver)
// match couchbase, pdo_oci, oci8, http, pecl_http // match couchbase, pdo_oci, oci8, http, pecl_http
@ -53,19 +66,6 @@ export async function addExtensionDarwin(
ext_prefix ext_prefix
); );
return; 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 // match semver
case /.+-\d+\.\d+\.\d+.*/.test(extension): case /.+-\d+\.\d+\.\d+.*/.test(extension):
add_script += await utils.joins( add_script += await utils.joins(
@ -243,6 +243,19 @@ export async function addExtensionLinux(
case /^:/.test(ext_name): case /^:/.test(ext_name):
remove_script += '\nremove_extension ' + ext_name.slice(1); remove_script += '\nremove_extension ' + ext_name.slice(1);
return; 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...8.0blackfire
// match 5.3blackfire-(semver)...8.0blackfire-(semver) // match 5.3blackfire-(semver)...8.0blackfire-(semver)
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid // match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
@ -279,19 +292,6 @@ export async function addExtensionLinux(
ext_prefix ext_prefix
); );
return; 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 // match semver versions
case /.+-\d+\.\d+\.\d+.*/.test(extension): case /.+-\d+\.\d+\.\d+.*/.test(extension):
add_script += await utils.joins( add_script += await utils.joins(