Add build mode to configuration
This commit is contained in:
parent
401f9d6286
commit
0166a8a567
12 changed files with 27 additions and 6 deletions
6
lib/config-utils.js
generated
6
lib/config-utils.js
generated
|
|
@ -212,12 +212,13 @@ exports.getRawLanguages = getRawLanguages;
|
|||
/**
|
||||
* Get the default config for when the user has not supplied one.
|
||||
*/
|
||||
async function getDefaultConfig({ languagesInput, queriesInput, packsInput, dbLocation, trapCachingEnabled, debugMode, debugArtifactName, debugDatabaseName, repository, tempDir, codeql, githubVersion, logger, }) {
|
||||
async function getDefaultConfig({ languagesInput, queriesInput, packsInput, buildModeInput, dbLocation, trapCachingEnabled, debugMode, debugArtifactName, debugDatabaseName, repository, tempDir, codeql, githubVersion, logger, }) {
|
||||
const languages = await getLanguages(codeql, languagesInput, repository, logger);
|
||||
const augmentationProperties = calculateAugmentation(packsInput, queriesInput, languages);
|
||||
const { trapCaches, trapCacheDownloadTime } = await downloadCacheWithTime(trapCachingEnabled, codeql, languages, logger);
|
||||
return {
|
||||
languages,
|
||||
buildMode: buildModeInput,
|
||||
originalUserInput: {},
|
||||
tempDir,
|
||||
codeQLCmd: codeql.getPath(),
|
||||
|
|
@ -245,7 +246,7 @@ async function downloadCacheWithTime(trapCachingEnabled, codeQL, languages, logg
|
|||
/**
|
||||
* Load the config from the given file.
|
||||
*/
|
||||
async function loadConfig({ languagesInput, queriesInput, packsInput, configFile, dbLocation, trapCachingEnabled, debugMode, debugArtifactName, debugDatabaseName, repository, tempDir, codeql, workspacePath, githubVersion, apiDetails, logger, }) {
|
||||
async function loadConfig({ languagesInput, queriesInput, packsInput, buildModeInput, configFile, dbLocation, trapCachingEnabled, debugMode, debugArtifactName, debugDatabaseName, repository, tempDir, codeql, workspacePath, githubVersion, apiDetails, logger, }) {
|
||||
let parsedYAML;
|
||||
if (isLocal(configFile)) {
|
||||
// Treat the config file as relative to the workspace
|
||||
|
|
@ -260,6 +261,7 @@ async function loadConfig({ languagesInput, queriesInput, packsInput, configFile
|
|||
const { trapCaches, trapCacheDownloadTime } = await downloadCacheWithTime(trapCachingEnabled, codeql, languages, logger);
|
||||
return {
|
||||
languages,
|
||||
buildMode: buildModeInput,
|
||||
originalUserInput: parsedYAML,
|
||||
tempDir,
|
||||
codeQLCmd: codeql.getPath(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue