Browse Source

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>
Álvaro Brey 2 years ago
parent
commit
96ee2ee661
2 changed files with 4 additions and 4 deletions
  1. 2 2
      scripts/analysis/analysis-wrapper.sh
  2. 2 2
      scripts/analysis/spotbugs-up.rb

+ 2 - 2
scripts/analysis/analysis-wrapper.sh

@@ -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:

+ 2 - 2
scripts/analysis/spotbugs-up.rb

@@ -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