diff options
author | Ismail Cherri <ismail.cherri@sonarsource.com> | 2024-04-02 13:31:51 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-04-03 20:02:41 +0000 |
commit | acc58583612d7a6d560b159eb5d680a097b9d47e (patch) | |
tree | 513eb02ea758eafa8ae9821b37067f501a5e1887 /server/sonar-web/src/main/js | |
parent | 62458cc73c69ff89de412fe3fcaff19cb88dd0bb (diff) | |
download | sonarqube-acc58583612d7a6d560b159eb5d680a097b9d47e.tar.gz sonarqube-acc58583612d7a6d560b159eb5d680a097b9d47e.zip |
SONAR-21909 Remove "build" from current version information
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/strings.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/helpers/strings.ts b/server/sonar-web/src/main/js/helpers/strings.ts index ad92fb85eb4..afc008c5ed0 100644 --- a/server/sonar-web/src/main/js/helpers/strings.ts +++ b/server/sonar-web/src/main/js/helpers/strings.ts @@ -415,9 +415,8 @@ export function decodeJwt(token: string) { return JSON.parse(window.atob(base64)); } -const VERSION_REGEX = /[\s()]/g; -const VERSION_BUILD = 'build'; +const VERSION_BUILD = 'build '; export function getInstanceVersionNumber(version: string) { - // e.g. "10.5 (build 12345)" => "10.5.12345" - return version.replace(VERSION_REGEX, '').replace(VERSION_BUILD, '.'); + // e.g. "10.5 (build 12345)" => "10.5 (12345)" + return version.replace(VERSION_BUILD, ''); } |