From 46529b8158c1b885b5c6c9464bcc5f0f6ba340e6 Mon Sep 17 00:00:00 2001 From: Abit Date: Fri, 6 May 2022 21:02:39 +0200 Subject: [PATCH] Fix SonarScanner version detection --- .github/workflows/sonar-scan.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml index f42b2260b8..ffb5bfaf01 100644 --- a/.github/workflows/sonar-scan.yml +++ b/.github/workflows/sonar-scan.yml @@ -17,8 +17,9 @@ jobs: steps: - name: Download and install latest SonarScanner CLI tool run: | - SONAR_SCANNER_VERSION=`curl https://github.com/SonarSource/sonar-scanner-cli/releases/latest \ - 2>/dev/null | cut -f2 -d'"' | cut -f8 -d'/'` + SONAR_SCANNER_VERSION=`curl -w %{redirect_url} \ + https://github.com/SonarSource/sonar-scanner-cli/releases/latest \ + 2>/dev/null | cut -f8 -d'/'` SONAR_DOWNLOAD_PATH=https://binaries.sonarsource.com/Distribution/sonar-scanner-cli curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip \ $SONAR_DOWNLOAD_PATH/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip