mirror of
https://github.com/github/codeql-action.git
synced 2026-10-29 17:17:15 +00:00
Use macOSVersion in isSwiftCompatible
This commit is contained in:
22
lib/entry-points.js
generated
22
lib/entry-points.js
generated
@@ -175650,6 +175650,16 @@ function getBundlePlatform(platform2 = process.platform, arch2 = process.arch) {
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
function macOSVersion(action) {
|
||||
if (action.platform !== "darwin") {
|
||||
return void 0;
|
||||
}
|
||||
const version = semver7.parse(action.osRelease);
|
||||
if (version === null) {
|
||||
return action.osRelease;
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
// src/per-language-bundles.ts
|
||||
var MIN_PER_LANGUAGE_BUNDLE_CLI_VERSION = "2.27.1";
|
||||
@@ -186035,11 +186045,21 @@ async function getToolsInput(action, repositoryProperties) {
|
||||
|
||||
// src/languages/swift.ts
|
||||
function isSwiftCompatible(action, config) {
|
||||
if (config.languages.includes("swift" /* swift */) && action.platform !== "darwin") {
|
||||
if (!config.languages.includes("swift" /* swift */)) {
|
||||
return;
|
||||
}
|
||||
const version = macOSVersion(action);
|
||||
if (version === void 0) {
|
||||
throw new ConfigurationError(
|
||||
`Swift analysis is only supported on macOS runner images. Please migrate to a macOS runner.`
|
||||
);
|
||||
}
|
||||
if (typeof version === "string") {
|
||||
action.logger.warning(
|
||||
`Unable to determine version of macOS, got: ${version}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// src/status-report/tools-download.ts
|
||||
|
||||
Reference in New Issue
Block a user