mirror of
https://github.com/github/codeql-action.git
synced 2026-11-09 06:29:52 +00:00
Clarify that we are looking at the Darwin version
This commit is contained in:
18
lib/entry-points.js
generated
18
lib/entry-points.js
generated
@@ -183429,7 +183429,7 @@ function getBundlePlatform(platform2 = process.platform, arch2 = process.arch) {
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
function macOSVersion(action) {
|
||||
function darwinVersion(action) {
|
||||
if (action.platform !== "darwin") {
|
||||
return void 0;
|
||||
}
|
||||
@@ -193906,14 +193906,14 @@ async function getToolsInput(action, repositoryProperties) {
|
||||
}
|
||||
|
||||
// src/languages/swift.ts
|
||||
async function checkSwiftCompatibility(config, codeql, macosVersion) {
|
||||
async function checkSwiftCompatibility(config, codeql, darwinVersion2) {
|
||||
if (!config.languages.includes("swift" /* swift */)) {
|
||||
return;
|
||||
}
|
||||
if (await codeql.supportsFeature("swiftSupportsAllPlatforms" /* SwiftSupportsAllPlatforms */)) {
|
||||
return;
|
||||
}
|
||||
if (macosVersion === void 0) {
|
||||
if (darwinVersion2 === void 0) {
|
||||
throw new ConfigurationError(
|
||||
`Swift analysis is only supported on macOS runner images. Please migrate to a macOS runner.`
|
||||
);
|
||||
@@ -193921,15 +193921,15 @@ async function checkSwiftCompatibility(config, codeql, macosVersion) {
|
||||
}
|
||||
|
||||
// src/languages/traced.ts
|
||||
var UNSUPPORTED_MACOS_FOR_TRACED = 27;
|
||||
var UNSUPPORTED_DARWIN_FOR_TRACED = 27;
|
||||
var UNSUPPORTED_XCODE_FOR_TRACED = 27;
|
||||
function handleUnsupportedVersion(logger2, config, skipUnsupportedTracedAnalysis, product, version) {
|
||||
const baseMessage = [
|
||||
`Traced analysis is not supported on ${product} ${UNSUPPORTED_MACOS_FOR_TRACED} or above.`,
|
||||
`Configure your analysis to run on macOS ${UNSUPPORTED_MACOS_FOR_TRACED - 1} or below`,
|
||||
`Traced analysis is not supported on ${product} ${UNSUPPORTED_DARWIN_FOR_TRACED} or above.`,
|
||||
`Configure your analysis to run on macOS ${UNSUPPORTED_DARWIN_FOR_TRACED - 1} or below`,
|
||||
`and XCode ${UNSUPPORTED_XCODE_FOR_TRACED - 1} or below.`
|
||||
].join(" ");
|
||||
const attributeName = product === "macOS" ? "macOSVersion" : "xcodeVersion";
|
||||
const attributeName = product === "macOS" ? "darwinVersion" : "xcodeVersion";
|
||||
for (const language of config.languages) {
|
||||
addDiagnostic(
|
||||
config,
|
||||
@@ -193975,7 +193975,7 @@ async function hasTracedLanguages(config, codeql) {
|
||||
return false;
|
||||
}
|
||||
async function checkRunnerSupportsTracedAnalysis(action, config, codeql) {
|
||||
const version = macOSVersion(action);
|
||||
const version = darwinVersion(action);
|
||||
await checkSwiftCompatibility(config, codeql, version);
|
||||
if (config.buildMode !== void 0 && config.buildMode === "none") {
|
||||
return;
|
||||
@@ -193990,7 +193990,7 @@ async function checkRunnerSupportsTracedAnalysis(action, config, codeql) {
|
||||
action.logger.warning(
|
||||
`Unable to determine version of macOS, got: ${version}`
|
||||
);
|
||||
} else if (version !== void 0 && version.major >= UNSUPPORTED_MACOS_FOR_TRACED) {
|
||||
} else if (version !== void 0 && version.major >= UNSUPPORTED_DARWIN_FOR_TRACED) {
|
||||
handleUnsupportedVersion(
|
||||
action.logger,
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user