mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-23 04:11:06 +07:00
Improve regexes in extensions.ts
This commit is contained in:
parent
0cc14f65a2
commit
0a5e543af7
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -2761,7 +2761,7 @@ async function addExtensionDarwin(extension_csv, version) {
|
|||||||
let command = '';
|
let command = '';
|
||||||
switch (true) {
|
switch (true) {
|
||||||
// match pre-release versions
|
// match pre-release versions
|
||||||
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
case /.+-(beta|alpha|devel|snapshot)/.test(extension):
|
||||||
script +=
|
script +=
|
||||||
'\nadd_unstable_extension ' +
|
'\nadd_unstable_extension ' +
|
||||||
extension_name +
|
extension_name +
|
||||||
@ -2820,7 +2820,7 @@ async function addExtensionWindows(extension_csv, version) {
|
|||||||
const version_extension = version + extension;
|
const version_extension = version + extension;
|
||||||
switch (true) {
|
switch (true) {
|
||||||
// match pre-release versions
|
// match pre-release versions
|
||||||
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
case /.+-(beta|alpha|devel|snapshot)/.test(extension):
|
||||||
script += '\nAdd-Extension ' + extension_name + ' ' + stability;
|
script += '\nAdd-Extension ' + extension_name + ' ' + stability;
|
||||||
break;
|
break;
|
||||||
// match 5.6mysql, 5.6mysqli, 5.6mysqlnd
|
// match 5.6mysql, 5.6mysqli, 5.6mysqlnd
|
||||||
@ -2880,7 +2880,7 @@ async function addExtensionLinux(extension_csv, version, pipe) {
|
|||||||
let command = '';
|
let command = '';
|
||||||
switch (true) {
|
switch (true) {
|
||||||
// match pre-release versions
|
// match pre-release versions
|
||||||
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
case /.+-(beta|alpha|devel|snapshot)/.test(extension):
|
||||||
script +=
|
script +=
|
||||||
'\nadd_unstable_extension ' +
|
'\nadd_unstable_extension ' +
|
||||||
extension_name +
|
extension_name +
|
||||||
|
@ -21,7 +21,7 @@ export async function addExtensionDarwin(
|
|||||||
let command = '';
|
let command = '';
|
||||||
switch (true) {
|
switch (true) {
|
||||||
// match pre-release versions
|
// match pre-release versions
|
||||||
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
case /.+-(beta|alpha|devel|snapshot)/.test(extension):
|
||||||
script +=
|
script +=
|
||||||
'\nadd_unstable_extension ' +
|
'\nadd_unstable_extension ' +
|
||||||
extension_name +
|
extension_name +
|
||||||
@ -85,7 +85,7 @@ export async function addExtensionWindows(
|
|||||||
const version_extension: string = version + extension;
|
const version_extension: string = version + extension;
|
||||||
switch (true) {
|
switch (true) {
|
||||||
// match pre-release versions
|
// match pre-release versions
|
||||||
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
case /.+-(beta|alpha|devel|snapshot)/.test(extension):
|
||||||
script += '\nAdd-Extension ' + extension_name + ' ' + stability;
|
script += '\nAdd-Extension ' + extension_name + ' ' + stability;
|
||||||
break;
|
break;
|
||||||
// match 5.6mysql, 5.6mysqli, 5.6mysqlnd
|
// match 5.6mysql, 5.6mysqli, 5.6mysqlnd
|
||||||
@ -149,7 +149,7 @@ export async function addExtensionLinux(
|
|||||||
let command = '';
|
let command = '';
|
||||||
switch (true) {
|
switch (true) {
|
||||||
// match pre-release versions
|
// match pre-release versions
|
||||||
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
|
case /.+-(beta|alpha|devel|snapshot)/.test(extension):
|
||||||
script +=
|
script +=
|
||||||
'\nadd_unstable_extension ' +
|
'\nadd_unstable_extension ' +
|
||||||
extension_name +
|
extension_name +
|
||||||
|
Loading…
Reference in New Issue
Block a user