Convert rest of the actions

This commit is contained in:
Robert Brignull 2020-08-25 16:19:15 +01:00
parent aac5eb2aea
commit 217483dfd6
59 changed files with 1630 additions and 915 deletions

21
src/autobuild.ts Normal file
View 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();
}