mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
C#: autobuild: fix buildless mode for CodeQL
This commit is contained in:
@@ -11,10 +11,15 @@ namespace Semmle.Autobuild.CSharp
|
||||
{
|
||||
BuildScript GetCommand(string? solution)
|
||||
{
|
||||
if (builder.SemmlePlatformTools is null)
|
||||
string standalone;
|
||||
if (!(builder.CodeQLExtractorLangRoot is null) && !(builder.CodeQlPlatform is null)) {
|
||||
standalone = builder.Actions.PathCombine(builder.CodeQLExtractorLangRoot, "tools", builder.CodeQlPlatform, "Semmle.Extraction.CSharp.Standalone");
|
||||
} else if (!(builder.SemmlePlatformTools is null)) {
|
||||
standalone = builder.Actions.PathCombine(builder.SemmlePlatformTools, "csharp", "Semmle.Extraction.CSharp.Standalone");
|
||||
} else {
|
||||
return BuildScript.Failure;
|
||||
}
|
||||
|
||||
var standalone = builder.Actions.PathCombine(builder.SemmlePlatformTools, "csharp", "Semmle.Extraction.CSharp.Standalone");
|
||||
var cmd = new CommandBuilder(builder.Actions);
|
||||
cmd.RunCommand(standalone);
|
||||
|
||||
|
||||
@@ -193,6 +193,8 @@ namespace Semmle.Autobuild.Shared
|
||||
SemmleDist = Actions.GetEnvironmentVariable("SEMMLE_DIST");
|
||||
SemmlePlatformTools = Actions.GetEnvironmentVariable("SEMMLE_PLATFORM_TOOLS");
|
||||
|
||||
CodeQlPlatform = Actions.GetEnvironmentVariable("CODEQL_PLATFORM");
|
||||
|
||||
JavaHome =
|
||||
Actions.GetEnvironmentVariable("CODEQL_JAVA_HOME") ??
|
||||
Actions.GetEnvironmentVariable("SEMMLE_JAVA_HOME") ??
|
||||
@@ -271,7 +273,7 @@ namespace Semmle.Autobuild.Shared
|
||||
/// <summary>
|
||||
/// Value of CODEQL_EXTRACTOR_<LANG>_ROOT environment variable.
|
||||
/// </summary>
|
||||
private string? CodeQLExtractorLangRoot { get; }
|
||||
public string? CodeQLExtractorLangRoot { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Value of SEMMLE_DIST environment variable.
|
||||
@@ -287,6 +289,11 @@ namespace Semmle.Autobuild.Shared
|
||||
/// </summary>
|
||||
public string? SemmlePlatformTools { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Value of CODEQL_PLATFORM environment variable.
|
||||
/// </summary>
|
||||
public string? CodeQlPlatform { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The absolute path of the odasa executable.
|
||||
/// null if we are running in CodeQL.
|
||||
|
||||
Reference in New Issue
Block a user