mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Ignore pre-release parts when comparing GHES versions
This commit is contained in:
5
lib/upload-lib.js
generated
5
lib/upload-lib.js
generated
@@ -57,7 +57,6 @@ const zlib_1 = __importDefault(require("zlib"));
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const file_url_1 = __importDefault(require("file-url"));
|
||||
const jsonschema = __importStar(require("jsonschema"));
|
||||
const semver = __importStar(require("semver"));
|
||||
const actionsUtil = __importStar(require("./actions-util"));
|
||||
const api = __importStar(require("./api-client"));
|
||||
const api_client_1 = require("./api-client");
|
||||
@@ -139,7 +138,7 @@ function areAllRunsUnique(sarifObjects) {
|
||||
async function shouldShowCombineSarifFilesDeprecationWarning(sarifObjects, githubVersion) {
|
||||
// Do not show this warning on GHES versions before 3.14.0
|
||||
if (githubVersion.type === util_1.GitHubVariant.GHES &&
|
||||
semver.lt((0, util_1.parseGhesVersion)(githubVersion.version), "3.14.0")) {
|
||||
(0, util_1.satisfiesGHESVersion)(githubVersion.version, "<3.14", true)) {
|
||||
return false;
|
||||
}
|
||||
// Only give a deprecation warning when not all runs are unique and
|
||||
@@ -159,7 +158,7 @@ async function throwIfCombineSarifFilesDisabled(sarifObjects, features, githubVe
|
||||
async function shouldDisableCombineSarifFiles(sarifObjects, features, githubVersion) {
|
||||
if (githubVersion.type === util_1.GitHubVariant.GHES) {
|
||||
// Never block on GHES versions before 3.18.
|
||||
if (semver.lt((0, util_1.parseGhesVersion)(githubVersion.version), "3.18.0-0")) {
|
||||
if ((0, util_1.satisfiesGHESVersion)(githubVersion.version, "<3.18", true)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user