From 38b844a09113a5078dd73602218e68e8e572c643 Mon Sep 17 00:00:00 2001 From: Ed Reel Date: Fri, 15 Aug 2025 02:54:26 -0500 Subject: [PATCH] Display 'Up to date' in version.rb only with verbose option...for real (#12472) --- tools/version.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/version.rb b/tools/version.rb index 480ac9ab8..44ab029f3 100755 --- a/tools/version.rb +++ b/tools/version.rb @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -# version.rb version 1.9.1 (for Chromebrew) +# version.rb version 1.9.2 (for Chromebrew) OPTIONS = %w[-h --help -j --json -u --update-package-files -v --verbose] @@ -312,7 +312,7 @@ if filelist.length.positive? when 'Updated.' version_status_string = 'Updated.'.ljust(status_field_length).blue when 'Up to date.' - version_status_string = 'Up to date.'.ljust(status_field_length).lightgreen if VERBOSE + version_status_string = 'Up to date.'.ljust(status_field_length).lightgreen end updatable_string = (updatable_pkg[@pkg.name.to_sym] == 'Yes' ? 'Yes'.lightgreen : 'No'.lightred) if updatable_string.nil? cleaned_pkg_version = PackageUtils.get_clean_version(@pkg.version) @@ -320,7 +320,7 @@ if filelist.length.positive? addendum_string = "#{@pkg.name} cannot be automatically updated: ".red + "#{updatable_pkg[@pkg.name.to_sym]}\n".purple unless updatable_pkg[@pkg.name.to_sym] == 'Yes' version_line_string[@pkg.name.to_sym] = "#{@pkg.name.ljust(package_field_length)}#{version_status_string}#{cleaned_pkg_version.ljust(version_field_length)}#{upstream_version.chomp.ljust(version_field_length)}#{updatable_string}\n" - print version_line_string[@pkg.name.to_sym] unless OUTPUT_JSON + print version_line_string[@pkg.name.to_sym] unless OUTPUT_JSON || ((versions_updated[@pkg.name.to_sym] == 'Up to date.') && !VERBOSE) print addendum_string unless addendum_string.blank? || OUTPUT_JSON print "Failed to update version in #{@pkg.name} to #{upstream_version.chomp}".yellow if !OUTPUT_JSON && (versions_updated[@pkg.name.to_sym].to_s == 'false')