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:
parent
73a18fbf6e
commit
96ee2ee661
|
@ -14,8 +14,8 @@ repository="android"
|
||||||
ruby scripts/analysis/lint-up.rb $1 $2 $3
|
ruby scripts/analysis/lint-up.rb $1 $2 $3
|
||||||
lintValue=$?
|
lintValue=$?
|
||||||
|
|
||||||
curl 2>/dev/null "https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.xml" -o "/tmp/$stableBranch.xml"
|
curl "https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.xml" -o "/tmp/$stableBranch.xml"
|
||||||
ruby scripts/analysis/spotbugs-up.rb "$3"
|
ruby scripts/analysis/spotbugs-up.rb "$stableBranch"
|
||||||
spotbugsValue=$?
|
spotbugsValue=$?
|
||||||
|
|
||||||
# exit codes:
|
# exit codes:
|
||||||
|
|
|
@ -7,7 +7,7 @@ Encoding.default_internal = Encoding::UTF_8
|
||||||
puts "=================== starting Android Spotbugs Entropy Reducer ===================="
|
puts "=================== starting Android Spotbugs Entropy Reducer ===================="
|
||||||
|
|
||||||
# get args
|
# get args
|
||||||
git_branch = ARGV[0]
|
base_branch = ARGV[0]
|
||||||
|
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'pathname'
|
require 'pathname'
|
||||||
|
@ -22,7 +22,7 @@ current_warning_count = `./scripts/analysis/spotbugsSummary.py --total`.to_i
|
||||||
puts "found warnings: " + current_warning_count.to_s
|
puts "found warnings: " + current_warning_count.to_s
|
||||||
|
|
||||||
# get warning counts from target branch
|
# get warning counts from target branch
|
||||||
previous_xml = "/tmp/#{git_branch}.xml"
|
previous_xml = "/tmp/#{base_branch}.xml"
|
||||||
previous_results = File.file?(previous_xml)
|
previous_results = File.file?(previous_xml)
|
||||||
|
|
||||||
if previous_results == true
|
if previous_results == true
|
||||||
|
|
Loading…
Reference in New Issue