From 428a8bbcc95d23d5035e74a9171a6a1e5a1c5658 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 15 Apr 2019 09:33:53 +0200 Subject: [PATCH] show codacy count only on master Signed-off-by: tobiasKaminsky --- scripts/analysis/analysis-wrapper.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/analysis/analysis-wrapper.sh b/scripts/analysis/analysis-wrapper.sh index 8725bc79c7d7..00f699981e3e 100755 --- a/scripts/analysis/analysis-wrapper.sh +++ b/scripts/analysis/analysis-wrapper.sh @@ -97,8 +97,13 @@ else lintWarningOld=0 fi - codacyValue=$(curl 2>/dev/null https://app.codacy.com/dashboards/breakdown\?projectId\=44248 | grep "total issues" | cut -d">" -f3 | cut -d"<" -f1) - codacyResult="

Codacy

$codacyValue" + if [ $stableBranch = "master" ] ; then + codacyValue=$(curl 2>/dev/null https://app.codacy.com/dashboards/breakdown\?projectId\=44248 | grep "total issues" | cut -d">" -f3 | cut -d"<" -f1) + codacyResult="

Codacy

$codacyValue" + else + codacyResult="" + fi + lintResult="

Lint

Type$stableBranchPR
Warnings"$lintWarningOld""$lintWarningNew"
Errors"$lintErrorOld""$lintErrorNew"
" findbugsResultNew=$(sed -n "/

Summary<\/h1>/,/

Warnings<\/h1>/p" build/reports/spotbugs/spotbugs.html |head -n-1 | sed s'/<\/a>//'g | sed s'///'g | sed s"#Summary#SpotBugs (new)#" | tr "\"" "\'" | tr -d "\n") findbugsResultOld=$(curl 2>/dev/null https://www.kaminsky.me/nc-dev/$repository-findbugs/findbugs-summary-$stableBranch.html | tr "\"" "\'" | tr -d "\r\n" | sed s"#SpotBugs#SpotBugs#" | tr "\"" "\'" | tr -d "\n")