Fix spotbugs not failing builds when count increases

spotbugs-up now needs base branch, not target branch

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-05-06 09:32:15 +02:00
parent 73a18fbf6e
commit 96ee2ee661
No known key found for this signature in database
GPG Key ID: 2585783189A62105
2 changed files with 4 additions and 4 deletions

View File

@ -14,8 +14,8 @@ repository="android"
ruby scripts/analysis/lint-up.rb $1 $2 $3
lintValue=$?
curl 2>/dev/null "https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.xml" -o "/tmp/$stableBranch.xml"
ruby scripts/analysis/spotbugs-up.rb "$3"
curl "https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.xml" -o "/tmp/$stableBranch.xml"
ruby scripts/analysis/spotbugs-up.rb "$stableBranch"
spotbugsValue=$?
# exit codes:

View File

@ -7,7 +7,7 @@ Encoding.default_internal = Encoding::UTF_8
puts "=================== starting Android Spotbugs Entropy Reducer ===================="
# get args
git_branch = ARGV[0]
base_branch = ARGV[0]
require 'fileutils'
require 'pathname'
@ -22,7 +22,7 @@ current_warning_count = `./scripts/analysis/spotbugsSummary.py --total`.to_i
puts "found warnings: " + current_warning_count.to_s
# get warning counts from target branch
previous_xml = "/tmp/#{git_branch}.xml"
previous_xml = "/tmp/#{base_branch}.xml"
previous_results = File.file?(previous_xml)
if previous_results == true