mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-07-23 23:29:07 +07:00
Merge pull request #794 from davereid/patch-1
Provide a "lowest" php-version parameter
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
{
|
||||
"lowest": "8.1",
|
||||
"latest": "8.3",
|
||||
"nightly": "8.4",
|
||||
"5.x": "5.6",
|
||||
"7.x": "7.4",
|
||||
"8.x": "8.3"
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ export async function getManifestURL(): Promise<string> {
|
||||
*/
|
||||
export async function parseVersion(version: string): Promise<string> {
|
||||
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
|
||||
];
|
||||
|
Reference in New Issue
Block a user