Convert rest of the actions
This commit is contained in:
parent
aac5eb2aea
commit
217483dfd6
59 changed files with 1630 additions and 915 deletions
21
src/autobuild.ts
Normal file
21
src/autobuild.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { getCodeQL } from './codeql';
|
||||
import * as config_utils from './config-utils';
|
||||
import { isTracedLanguage, Language } from './languages';
|
||||
import { Logger } from './logging';
|
||||
|
||||
export async function runAutobuild(
|
||||
language: Language,
|
||||
tmpDir: string,
|
||||
logger: Logger) {
|
||||
|
||||
if (!isTracedLanguage(language)) {
|
||||
throw new Error(`Cannot build "${language}" as it is not a traced language`);
|
||||
}
|
||||
|
||||
const config = await config_utils.getConfig(tmpDir, logger);
|
||||
|
||||
logger.startGroup(`Attempting to automatically build ${language} code`);
|
||||
const codeQL = getCodeQL(config.codeQLCmd);
|
||||
await codeQL.runAutobuild(language);
|
||||
logger.endGroup();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue