mirror of
https://github.com/github/codeql-action.git
synced 2026-04-26 16:58:47 +00:00
Merge pull request #3404 from github/henrymercer/include-oids-in-bundle
Include base database OIDs when bundling database
This commit is contained in:
Generated
+19
-10
@@ -18850,7 +18850,7 @@ var require_io = __commonJS({
|
||||
if (path8.relative(source, newDest) === "") {
|
||||
throw new Error(`'${newDest}' and '${source}' are the same file`);
|
||||
}
|
||||
yield copyFile(source, newDest, force);
|
||||
yield copyFile2(source, newDest, force);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -18983,13 +18983,13 @@ var require_io = __commonJS({
|
||||
if (srcFileStat.isDirectory()) {
|
||||
yield cpDirRecursive(srcFile, destFile, currentDepth, force);
|
||||
} else {
|
||||
yield copyFile(srcFile, destFile, force);
|
||||
yield copyFile2(srcFile, destFile, force);
|
||||
}
|
||||
}
|
||||
yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);
|
||||
});
|
||||
}
|
||||
function copyFile(srcFile, destFile, force) {
|
||||
function copyFile2(srcFile, destFile, force) {
|
||||
return __awaiter2(this, void 0, void 0, function* () {
|
||||
if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {
|
||||
try {
|
||||
@@ -29985,7 +29985,7 @@ var require_io2 = __commonJS({
|
||||
if (path8.relative(source, newDest) === "") {
|
||||
throw new Error(`'${newDest}' and '${source}' are the same file`);
|
||||
}
|
||||
yield copyFile(source, newDest, force);
|
||||
yield copyFile2(source, newDest, force);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -30124,13 +30124,13 @@ var require_io2 = __commonJS({
|
||||
if (srcFileStat.isDirectory()) {
|
||||
yield cpDirRecursive(srcFile, destFile, currentDepth, force);
|
||||
} else {
|
||||
yield copyFile(srcFile, destFile, force);
|
||||
yield copyFile2(srcFile, destFile, force);
|
||||
}
|
||||
}
|
||||
yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);
|
||||
});
|
||||
}
|
||||
function copyFile(srcFile, destFile, force) {
|
||||
function copyFile2(srcFile, destFile, force) {
|
||||
return __awaiter2(this, void 0, void 0, function* () {
|
||||
if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {
|
||||
try {
|
||||
@@ -86519,6 +86519,7 @@ var maximumVersion = "3.20";
|
||||
var minimumVersion = "3.14";
|
||||
|
||||
// src/util.ts
|
||||
var BASE_DATABASE_OIDS_FILE_NAME = "base-database-oids.json";
|
||||
var BROKEN_VERSIONS = ["0.0.0-20211207"];
|
||||
var GITHUB_DOTCOM_URL = "https://github.com";
|
||||
var MINIMUM_CGROUP_MEMORY_LIMIT_BYTES = 1024 * 1024;
|
||||
@@ -86660,6 +86661,9 @@ function getCachedCodeQlVersion() {
|
||||
async function codeQlVersionAtLeast(codeql, requiredVersion) {
|
||||
return semver.gte((await codeql.getVersion()).version, requiredVersion);
|
||||
}
|
||||
function getBaseDatabaseOidsFilePath(config) {
|
||||
return path.join(config.dbLocation, BASE_DATABASE_OIDS_FILE_NAME);
|
||||
}
|
||||
async function delay(milliseconds, opts) {
|
||||
const { allowProcessExit } = opts || {};
|
||||
return new Promise((resolve4) => {
|
||||
@@ -87294,9 +87298,6 @@ async function readBaseDatabaseOidsFile(config, logger) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
function getBaseDatabaseOidsFilePath(config) {
|
||||
return path3.join(config.dbLocation, "base-database-oids.json");
|
||||
}
|
||||
async function writeOverlayChangesFile(config, sourceRoot, logger) {
|
||||
const baseFileOids = await readBaseDatabaseOidsFile(config, logger);
|
||||
const overlayFileOids = await getFileOidsUnderPath(sourceRoot);
|
||||
@@ -89364,7 +89365,7 @@ ${output}`
|
||||
await runCli(cmd, codeqlArgs);
|
||||
}
|
||||
},
|
||||
async databaseBundle(databasePath, outputFilePath, databaseName) {
|
||||
async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) {
|
||||
const args = [
|
||||
"database",
|
||||
"bundle",
|
||||
@@ -89373,6 +89374,14 @@ ${output}`
|
||||
`--name=${databaseName}`,
|
||||
...getExtraOptionsFromEnv(["database", "bundle"])
|
||||
];
|
||||
if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) {
|
||||
args.push(
|
||||
...alsoIncludeRelativePaths.flatMap((relativePath) => [
|
||||
"--include",
|
||||
relativePath
|
||||
])
|
||||
);
|
||||
}
|
||||
await new toolrunner3.ToolRunner(cmd, args).exec();
|
||||
},
|
||||
async databaseExportDiagnostics(databasePath, sarifFile, automationDetailsId) {
|
||||
|
||||
Reference in New Issue
Block a user