mirror of
https://github.com/github/codeql-action.git
synced 2026-05-07 22:30:44 +00:00
Fix parsing of GHES pre-release versions
This commit is contained in:
Generated
+8
@@ -77,6 +77,7 @@ exports.getErrorMessage = getErrorMessage;
|
||||
exports.prettyPrintPack = prettyPrintPack;
|
||||
exports.checkDiskUsage = checkDiskUsage;
|
||||
exports.checkActionVersion = checkActionVersion;
|
||||
exports.parseGhesVersion = parseGhesVersion;
|
||||
exports.cloneObject = cloneObject;
|
||||
exports.checkSipEnablement = checkSipEnablement;
|
||||
exports.cleanUpGlob = cleanUpGlob;
|
||||
@@ -887,6 +888,13 @@ function checkActionVersion(version, githubVersion) {
|
||||
}
|
||||
}
|
||||
}
|
||||
function parseGhesVersion(version) {
|
||||
// GHES pre-release versions are in the format "3.18.0.pre1", which is not a valid semver version.
|
||||
if (version.includes(".pre")) {
|
||||
version = version.replace(".pre", "-pre");
|
||||
}
|
||||
return new semver.SemVer(version);
|
||||
}
|
||||
/**
|
||||
* Supported build modes.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user