Extract constant for first std-compressed version
This commit is contained in:
parent
67b30f7c39
commit
bc68dc9d95
6 changed files with 15 additions and 5 deletions
6
lib/feature-flags.js
generated
6
lib/feature-flags.js
generated
|
|
@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = void 0;
|
||||
exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_ZSTD_BUNDLE = exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const semver = __importStar(require("semver"));
|
||||
|
|
@ -37,6 +37,10 @@ const DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
|||
* (Some earlier versions recognize the command-line flag, but they contain a bug which makes it unsafe to use).
|
||||
*/
|
||||
exports.CODEQL_VERSION_FINE_GRAINED_PARALLELISM = "2.15.1";
|
||||
/**
|
||||
* The first version of the CodeQL Bundle that shipped with zstd-compressed bundles.
|
||||
*/
|
||||
exports.CODEQL_VERSION_ZSTD_BUNDLE = "2.19.0";
|
||||
/**
|
||||
* Feature enablement as returned by the GitHub API endpoint.
|
||||
*
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
2
lib/setup-codeql.js
generated
2
lib/setup-codeql.js
generated
|
|
@ -563,7 +563,7 @@ function sanitizeUrlForStatusReport(url) {
|
|||
}
|
||||
async function useZstdBundle(cliVersion, features, tarSupportsZstd) {
|
||||
return (tarSupportsZstd &&
|
||||
semver.gte(cliVersion, "2.19.0") &&
|
||||
semver.gte(cliVersion, feature_flags_1.CODEQL_VERSION_ZSTD_BUNDLE) &&
|
||||
!!(await features.getValue(feature_flags_1.Feature.ZstdBundle)));
|
||||
}
|
||||
//# sourceMappingURL=setup-codeql.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -20,6 +20,11 @@ const DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled";
|
|||
*/
|
||||
export const CODEQL_VERSION_FINE_GRAINED_PARALLELISM = "2.15.1";
|
||||
|
||||
/**
|
||||
* The first version of the CodeQL Bundle that shipped with zstd-compressed bundles.
|
||||
*/
|
||||
export const CODEQL_VERSION_ZSTD_BUNDLE = "2.19.0";
|
||||
|
||||
export interface CodeQLDefaultVersionInfo {
|
||||
cliVersion: string;
|
||||
tagName: string;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import * as api from "./api-client";
|
|||
// these dependents.
|
||||
import * as defaults from "./defaults.json";
|
||||
import {
|
||||
CODEQL_VERSION_ZSTD_BUNDLE,
|
||||
CodeQLDefaultVersionInfo,
|
||||
Feature,
|
||||
FeatureEnablement,
|
||||
|
|
@ -823,7 +824,7 @@ async function useZstdBundle(
|
|||
): Promise<boolean> {
|
||||
return (
|
||||
tarSupportsZstd &&
|
||||
semver.gte(cliVersion, "2.19.0") &&
|
||||
semver.gte(cliVersion, CODEQL_VERSION_ZSTD_BUNDLE) &&
|
||||
!!(await features.getValue(Feature.ZstdBundle))
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue