mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 05:05:31 +03:00
show codacy count only on master
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
182b65ed34
commit
428a8bbcc9
1 changed files with 7 additions and 2 deletions
|
@ -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="<h1>Codacy</h1>$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="<h1>Codacy</h1>$codacyValue"
|
||||
else
|
||||
codacyResult=""
|
||||
fi
|
||||
|
||||
lintResult="<h1>Lint</h1><table width='500' cellpadding='5' cellspacing='2'><tr class='tablerow0'><td>Type</td><td><a href='https://www.kaminsky.me/nc-dev/"$repository"-lint/"$stableBranch".html'>$stableBranch</a></td><td><a href='https://www.kaminsky.me/nc-dev/"$repository"-lint/"$6".html'>PR</a></td></tr><tr class='tablerow1'><td>Warnings</td><td>"$lintWarningOld"</td><td>"$lintWarningNew"</td></tr><tr class='tablerow0'><td>Errors</td><td>"$lintErrorOld"</td><td>"$lintErrorNew"</td></tr></table>"
|
||||
findbugsResultNew=$(sed -n "/<h1>Summary<\/h1>/,/<h1>Warnings<\/h1>/p" build/reports/spotbugs/spotbugs.html |head -n-1 | sed s'/<\/a>//'g | sed s'/<a.*>//'g | sed s"#Summary#<a href=\"https://www.kaminsky.me/nc-dev/$repository-findbugs/$6.html\">SpotBugs</a> (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#<a href=\"https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.html\">SpotBugs</a>#" | tr "\"" "\'" | tr -d "\n")
|
||||
|
|
Loading…
Reference in a new issue