From a54aa91870f5de5405f99051967d296f409ea2f8 Mon Sep 17 00:00:00 2001 From: Benjamin Schultzer Date: Wed, 17 Jul 2024 16:57:23 -0400 Subject: [PATCH] Fix usage of version `latest` not matching internal elements (#298) --- dist/index.js | 4 +++- src/setup-beam.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index a54e73b..05e4cd2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -9536,6 +9536,8 @@ function getVersionFromSpec(spec0, versions0) { // If `version-type: strict` or version is RC, we obtain it directly version = versions0[spec] } + } else if (spec0 === 'latest') { + version = versions0[versions0.latest] } else if (rangeMax !== null) { // Otherwise, we compare alt. versions' semver ranges to this version, from highest to lowest const thatVersion = spec @@ -9604,7 +9606,7 @@ function isRC(ver) { } function isKnownBranch(ver) { - return ['main', 'master', 'maint', 'latest'].includes(ver) + return ['main', 'master', 'maint'].includes(ver) } function githubARMRunnerArchs() { diff --git a/src/setup-beam.js b/src/setup-beam.js index 06c11e7..b20e3ae 100644 --- a/src/setup-beam.js +++ b/src/setup-beam.js @@ -436,6 +436,8 @@ function getVersionFromSpec(spec0, versions0) { // If `version-type: strict` or version is RC, we obtain it directly version = versions0[spec] } + } else if (spec0 === 'latest') { + version = versions0[versions0.latest] } else if (rangeMax !== null) { // Otherwise, we compare alt. versions' semver ranges to this version, from highest to lowest const thatVersion = spec @@ -504,7 +506,7 @@ function isRC(ver) { } function isKnownBranch(ver) { - return ['main', 'master', 'maint', 'latest'].includes(ver) + return ['main', 'master', 'maint'].includes(ver) } function githubARMRunnerArchs() {