mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Merge pull request #794 from davereid/patch-1
Provide a "lowest" php-version parameter
This commit is contained in:
commit
c085ca391e
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1156,7 +1156,7 @@ async function getManifestURL() {
|
|||||||
exports.getManifestURL = getManifestURL;
|
exports.getManifestURL = getManifestURL;
|
||||||
async function parseVersion(version) {
|
async function parseVersion(version) {
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case /^(latest|nightly|\d+\.x)$/.test(version):
|
case /^(latest|lowest|nightly|\d+\.x)$/.test(version):
|
||||||
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[version];
|
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[version];
|
||||||
default:
|
default:
|
||||||
switch (true) {
|
switch (true) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"lowest": "8.1",
|
||||||
"latest": "8.3",
|
"latest": "8.3",
|
||||||
"nightly": "8.4",
|
"nightly": "8.4",
|
||||||
"5.x": "5.6",
|
"5.x": "5.6",
|
||||||
|
@ -59,7 +59,7 @@ export async function getManifestURL(): Promise<string> {
|
|||||||
*/
|
*/
|
||||||
export async function parseVersion(version: string): Promise<string> {
|
export async function parseVersion(version: string): Promise<string> {
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case /^(latest|nightly|\d+\.x)$/.test(version):
|
case /^(latest|lowest|nightly|\d+\.x)$/.test(version):
|
||||||
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[
|
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[
|
||||||
version
|
version
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user