mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-27 06:35:37 +01:00
properly read master-lint results
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
ac8c32de5c
commit
387194b480
@ -8,6 +8,8 @@
|
||||
#6: DRONE_BUILD_NUMBER
|
||||
#7: PULL_REQUEST_NUMBER
|
||||
|
||||
stableBranch="master"
|
||||
|
||||
ruby scripts/analysis/lint-up.rb $1 $2 $3
|
||||
lintValue=$?
|
||||
|
||||
@ -50,11 +52,28 @@ else
|
||||
done
|
||||
|
||||
# add comment with results
|
||||
lintResultNew=$(grep "Lint Report.* [0-9]* warnings" app/build/reports/lint/lint.html | cut -f2 -d':' |cut -f1 -d'<')
|
||||
lintErrorNew=$(echo $lintResultNew | grep "[0-9]* error" -o | cut -f1 -d" ")
|
||||
lintWarningNew=$(echo $lintResultNew | grep "[0-9]* warning" -o | cut -f1 -d" ")
|
||||
lintErrorOld=$(grep "[0-9]* error" scripts/analysis/lint-results.txt -o | cut -f1 -d" ")
|
||||
lintWarningOld=$(grep "[0-9]* warning" scripts/analysis/lint-results.txt -o | cut -f1 -d" ")
|
||||
lintResultNew=$(grep "Lint Report.* [0-9]* warning" app/build/reports/lint/lint.html | cut -f2 -d':' |cut -f1 -d'<')
|
||||
|
||||
lintErrorNew=$(echo $lintResultNew | grep "[0-9]* error" -o | cut -f1 -d" ")
|
||||
if ( [ -z $lintErrorNew ] ); then
|
||||
lintErrorNew=0
|
||||
fi
|
||||
|
||||
lintWarningNew=$(echo $lintResultNew | grep "[0-9]* warning" -o | cut -f1 -d" ")
|
||||
if ( [ -z $lintWarningNew ] ); then
|
||||
lintWarningNew=0
|
||||
fi
|
||||
|
||||
lintResultOld=$(curl 2>/dev/null https://raw.githubusercontent.com/nextcloud/talk-android/$stableBranch/scripts/analysis/lint-results.txt)
|
||||
lintErrorOld=$(echo $lintResultOld | grep "[0-9]* error" -o | cut -f1 -d" ")
|
||||
if ( [ -z $lintErrorOld ] ); then
|
||||
lintErrorOld=0
|
||||
fi
|
||||
|
||||
lintWarningOld=$(echo $lintResultOld | grep "[0-9]* warning" -o | cut -f1 -d" ")
|
||||
if ( [ -z $lintWarningOld ] ); then
|
||||
lintWarningOld=0
|
||||
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/talk-lint/master.html'>Master</a></td><td><a href='https://www.kaminsky.me/nc-dev/talk-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" app/build/reports/findbugs/findbugs.html |head -n-1 | sed s'/<\/a>//'g | sed s'/<a.*>//'g | sed s"#Summary#<a href=\"https://www.kaminsky.me/nc-dev/talk-findbugs/$6.html\">FindBugs</a> (new)#" | tr "\"" "\'" | tr -d "\n")
|
||||
findbugsResultOld=$(curl 2>/dev/null https://www.kaminsky.me/nc-dev/talk-findbugs/findbugs-summary-master.html | tr "\"" "\'" | tr -d "\r\n" | sed s'#FindBugs#<a href=\"https://www.kaminsky.me/nc-dev/talk-findbugs/master.html">FindBugs</a>#'| tr "\"" "\'" | tr -d "\n")
|
||||
|
Loading…
Reference in New Issue
Block a user