Skip to content

Commit

Permalink
Fix usage of version latest not matching internal elements (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schultzer authored Jul 17, 2024
1 parent 168876b commit a54aa91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down
4 changes: 3 additions & 1 deletion src/setup-beam.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit a54aa91

Please sign in to comment.