Check exact version match

This commit is contained in:
Eric Meadows-Jönsson
2019-11-19 22:03:23 +01:00
parent 71a9eee041
commit a12d5327a9
+4
View File
@@ -67,9 +67,13 @@ async function getElixirVersion(spec, otpVersion) {
} }
function getVersionFromSpec(spec, versions) { function getVersionFromSpec(spec, versions) {
if (versions.includes(spec)) {
return spec;
} else {
const range = semver.validRange(spec) const range = semver.validRange(spec)
return semver.maxSatisfying(versions, range) return semver.maxSatisfying(versions, range)
} }
}
async function getOtpVersions() { async function getOtpVersions() {
const result = await get("https://raw.githubusercontent.com/erlang/otp/master/otp_versions.table") const result = await get("https://raw.githubusercontent.com/erlang/otp/master/otp_versions.table")