mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Add support for nightly alias
This commit is contained in:
parent
8eebeae48a
commit
d068c17d9e
@ -371,6 +371,7 @@ Disable coverage for these reasons:
|
||||
- Specify the PHP version you want to set up.
|
||||
- Accepts a `string`. For example `'8.0'`.
|
||||
- Accepts `latest` to set up the latest stable PHP version.
|
||||
- Accepts `nightly` to set up a nightly build from the master branch of PHP.
|
||||
- Accepts the format `d.x`, where `d` is the major version. For example `5.x`, `7.x` and `8.x`.
|
||||
- See [PHP support](#tada-php-support) for supported PHP versions.
|
||||
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -965,7 +965,7 @@ exports.getManifestURL = getManifestURL;
|
||||
async function parseVersion(version) {
|
||||
const manifest = await getManifestURL();
|
||||
switch (true) {
|
||||
case /^(latest|\d+\.x)$/.test(version):
|
||||
case /^(latest|nightly|\d+\.x)$/.test(version):
|
||||
return JSON.parse((await fetch(manifest))['data'])[version];
|
||||
default:
|
||||
switch (true) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"latest": "8.0",
|
||||
"nightly": "8.2",
|
||||
"5.x": "5.6",
|
||||
"7.x": "7.4",
|
||||
"8.x": "8.0"
|
||||
|
@ -102,7 +102,7 @@ export async function getManifestURL(): Promise<string> {
|
||||
export async function parseVersion(version: string): Promise<string> {
|
||||
const manifest = await getManifestURL();
|
||||
switch (true) {
|
||||
case /^(latest|\d+\.x)$/.test(version):
|
||||
case /^(latest|nightly|\d+\.x)$/.test(version):
|
||||
return JSON.parse((await fetch(manifest))['data'])[version];
|
||||
default:
|
||||
switch (true) {
|
||||
|
Loading…
Reference in New Issue
Block a user