From 1d5c828e48b12936a0f3e13a0a1bf7b608fbde31 Mon Sep 17 00:00:00 2001 From: Topin2001 Date: Tue, 11 Jun 2024 16:20:42 +0200 Subject: [PATCH] Allow for all SQ 10 versions; even if dev only for 10.5 --- src/main/java/fr/cnes/sonar/report/factory/ServerFactory.java | 2 +- src/main/js/common/api.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/cnes/sonar/report/factory/ServerFactory.java b/src/main/java/fr/cnes/sonar/report/factory/ServerFactory.java index e1729e2e..f65fee57 100644 --- a/src/main/java/fr/cnes/sonar/report/factory/ServerFactory.java +++ b/src/main/java/fr/cnes/sonar/report/factory/ServerFactory.java @@ -32,7 +32,7 @@ public class ServerFactory { /** List of SonarQube versions which are supported by cnesreport. */ private static final List SUPPORTED_VERSIONS = Arrays.asList( - "8.9", "8.9.*", "9.9", "9.9.*", "10.5", "10.5.*"); + "10.*", "10.*.*"); /** Url of the SonarQube server. */ private String url; diff --git a/src/main/js/common/api.js b/src/main/js/common/api.js index aec679d9..b60d4c2a 100644 --- a/src/main/js/common/api.js +++ b/src/main/js/common/api.js @@ -6,7 +6,7 @@ import { getJSON, postJSON, post } from "sonar-request"; // Function used to get current SonarQube Server version export function isCompatible() { - const COMPATIBILITY_PATTERN = /(8|9|10)(\.[5-9])(\.\d)*/; // To be change to the SQ 10 LTS + const COMPATIBILITY_PATTERN = /(10)(\.\d)(\.\d)*/; // To be change to the SQ 10 LTS return getJSON("/api/system/status").then(response => { return response.version.match(COMPATIBILITY_PATTERN) != null;