mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 17:39:50 +00:00
Share CodeQL bundle platform definitions
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
isRunningLocalAction,
|
||||
} from "./actions-util";
|
||||
import * as api from "./api-client";
|
||||
import { getBundlePlatform } from "./bundle-platform";
|
||||
import * as defaults from "./defaults.json";
|
||||
import {
|
||||
addNoLanguageDiagnostic,
|
||||
@@ -78,20 +79,6 @@ function getCodeQLBundleExtension(
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the platform component of the CodeQL bundle name for the current platform. */
|
||||
export function getBundlePlatform(): string | undefined {
|
||||
switch (process.platform) {
|
||||
case "win32":
|
||||
return "win64";
|
||||
case "linux":
|
||||
return process.arch === "arm64" ? "linux-arm64" : "linux64";
|
||||
case "darwin":
|
||||
return "osx64";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the CodeQL bundle asset to download.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user