mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-27 02:00:49 +00:00
Add known branch exceptions to version matching (#242)
This commit is contained in:
+5
-1
@@ -404,7 +404,7 @@ function getVersionFromSpec(spec0, versions0) {
|
||||
const rangeMax = semver.maxSatisfying(versions, rangeForMax)
|
||||
let version = null
|
||||
|
||||
if (isStrictVersion() || isRC(spec0)) {
|
||||
if (isStrictVersion() || isRC(spec0) || isKnownBranch(spec0)) {
|
||||
if (versions0[spec]) {
|
||||
// If `version-type: strict` or version is RC, we obtain it directly
|
||||
version = versions0[spec]
|
||||
@@ -476,6 +476,10 @@ function isRC(ver) {
|
||||
return ver.match(xyzAbcVersion('^', '(?:-rc\\.?\\d+)'))
|
||||
}
|
||||
|
||||
function isKnownBranch(ver) {
|
||||
return ['main', 'master', 'maint'].includes(ver)
|
||||
}
|
||||
|
||||
function getRunnerOSVersion() {
|
||||
const ImageOSToContainer = {
|
||||
ubuntu18: 'ubuntu-18.04',
|
||||
|
||||
Reference in New Issue
Block a user