From 607c9875ce6f4f5409a2d5483a6ec60dbad728c2 Mon Sep 17 00:00:00 2001 From: tiulpin Date: Fri, 12 Jul 2024 19:22:40 +0200 Subject: [PATCH] :zap: Enable `darwin` support (limited for nightly) --- common/qodana.ts | 9 +++++---- scan/dist/index.js | 9 +++++---- vsts/QodanaScan/index.js | 9 +++++---- vsts/vss-extension.dev.json | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/common/qodana.ts b/common/qodana.ts index b57b6151..d35e459e 100644 --- a/common/qodana.ts +++ b/common/qodana.ts @@ -22,7 +22,7 @@ import path from 'path' import fsp from 'fs/promises' import JSZip from 'jszip' -export const SUPPORTED_PLATFORMS = ['windows', 'linux'] +export const SUPPORTED_PLATFORMS = ['windows', 'linux', 'darwin'] export const SUPPORTED_ARCHS = ['x86_64', 'arm64'] export const FAIL_THRESHOLD_OUTPUT = 'The number of problems exceeds the failThreshold' @@ -48,6 +48,10 @@ export function getQodanaSha256(arch: string, platform: string): string { return checksum['linux_x86_64'] case 'linux_arm64': return checksum['linux_arm64'] + case 'darwin_x86_64': + return checksum['darwin_x86_64'] + case 'darwin_arm64': + return checksum['darwin_arm64'] default: throw new Error(`Qodana CLI does not exist for ${platform}_${arch}`) } @@ -57,9 +61,6 @@ export function getQodanaSha256(arch: string, platform: string): string { * Returns the architecture name suitable for the published Qodana CLI archive name. */ export function getProcessArchName(): string { - if (process.platform === 'darwin') { - return 'all' - } return process.arch === 'x64' ? 'x86_64' : 'arm64' } diff --git a/scan/dist/index.js b/scan/dist/index.js index 96825dc0..6edc4ed8 100644 --- a/scan/dist/index.js +++ b/scan/dist/index.js @@ -34213,14 +34213,15 @@ function getQodanaSha256(arch, platform) { return checksum["linux_x86_64"]; case "linux_arm64": return checksum["linux_arm64"]; + case "darwin_x86_64": + return checksum["darwin_x86_64"]; + case "darwin_arm64": + return checksum["darwin_arm64"]; default: throw new Error(`Qodana CLI does not exist for ${platform}_${arch}`); } } function getProcessArchName() { - if (process.platform === "darwin") { - return "all"; - } return process.arch === "x64" ? "x86_64" : "arm64"; } function getProcessPlatformName() { @@ -34372,7 +34373,7 @@ var init_qodana = __esm({ import_path = __toESM(require("path")); import_promises = __toESM(require("fs/promises")); import_jszip = __toESM(require_lib4()); - SUPPORTED_PLATFORMS = ["windows", "linux"]; + SUPPORTED_PLATFORMS = ["windows", "linux", "darwin"]; SUPPORTED_ARCHS = ["x86_64", "arm64"]; FAIL_THRESHOLD_OUTPUT = "The number of problems exceeds the failThreshold"; QODANA_SARIF_NAME = "qodana.sarif.json"; diff --git a/vsts/QodanaScan/index.js b/vsts/QodanaScan/index.js index 5b4e4d8b..0d78e474 100644 --- a/vsts/QodanaScan/index.js +++ b/vsts/QodanaScan/index.js @@ -9802,14 +9802,15 @@ function getQodanaSha256(arch, platform) { return checksum["linux_x86_64"]; case "linux_arm64": return checksum["linux_arm64"]; + case "darwin_x86_64": + return checksum["darwin_x86_64"]; + case "darwin_arm64": + return checksum["darwin_arm64"]; default: throw new Error(`Qodana CLI does not exist for ${platform}_${arch}`); } } function getProcessArchName() { - if (process.platform === "darwin") { - return "all"; - } return process.arch === "x64" ? "x86_64" : "arm64"; } function getProcessPlatformName() { @@ -9961,7 +9962,7 @@ var init_qodana = __esm({ import_path = __toESM(require("path")); import_promises = __toESM(require("fs/promises")); import_jszip = __toESM(require_lib3()); - SUPPORTED_PLATFORMS = ["windows", "linux"]; + SUPPORTED_PLATFORMS = ["windows", "linux", "darwin"]; SUPPORTED_ARCHS = ["x86_64", "arm64"]; FAIL_THRESHOLD_OUTPUT = "The number of problems exceeds the failThreshold"; QODANA_SARIF_NAME = "qodana.sarif.json"; diff --git a/vsts/vss-extension.dev.json b/vsts/vss-extension.dev.json index b0507f43..86e89cb6 100644 --- a/vsts/vss-extension.dev.json +++ b/vsts/vss-extension.dev.json @@ -2,7 +2,7 @@ "manifestVersion": 1, "id": "qodana-dev", "name": "Qodana (Dev)", - "version": "2024.1.109", + "version": "2024.1.111", "publisher": "JetBrains", "targets": [ {