SQSCANGHA-135 Update dist

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Julien HENRY
2026-06-04 14:54:47 +02:00
parent a851bcf3e0
commit a147d1907c
3 changed files with 18 additions and 4 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+16 -2
View File
@@ -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 {
+1 -1
View File
File diff suppressed because one or more lines are too long