mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2026-06-05 00:57:59 +03:00
SQSCANGHA-135 Update dist
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+16
-2
@@ -3862,6 +3862,19 @@ function getScannerDownloadURL({
|
||||
const scannerDirName = (version, flavor) =>
|
||||
`sonar-scanner-${version}-${flavor}`;
|
||||
|
||||
/**
|
||||
* Converts a 4-part version string (e.g. "8.0.1.6346") to a SemVer 2.0 compatible
|
||||
* string (e.g. "8.0.1-build.6346") for use with GitHub's tool-cache library,
|
||||
* which requires SemVer-compliant version strings.
|
||||
*/
|
||||
function toSemVer(version) {
|
||||
const parts = version.split(".");
|
||||
if (parts.length === 4) {
|
||||
return `${parts[0]}.${parts[1]}.${parts[2]}-build.${parts[3]}`;
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
/*
|
||||
* sonarqube-scan-action
|
||||
* Copyright (C) 2025 SonarSource SA
|
||||
@@ -4151,9 +4164,10 @@ async function installSonarScanner({
|
||||
skipSignatureVerification = false,
|
||||
}) {
|
||||
const flavor = getPlatformFlavor(os$1.platform(), os$1.arch());
|
||||
const semVerVersion = toSemVer(scannerVersion);
|
||||
|
||||
// Check if tool is already cached
|
||||
let toolDir = find(TOOLNAME, scannerVersion, flavor);
|
||||
let toolDir = find(TOOLNAME, semVerVersion, flavor);
|
||||
|
||||
if (!toolDir) {
|
||||
info(
|
||||
@@ -4196,7 +4210,7 @@ async function installSonarScanner({
|
||||
scannerDirName(scannerVersion, flavor)
|
||||
);
|
||||
|
||||
toolDir = await cacheDir(scannerPath, TOOLNAME, scannerVersion, flavor);
|
||||
toolDir = await cacheDir(scannerPath, TOOLNAME, semVerVersion, flavor);
|
||||
|
||||
info(`Sonar Scanner CLI cached to: ${toolDir}`);
|
||||
} else {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user