Fix autoupdate detection logic in version.rb (#14362)

This commit is contained in:
Ed Reel
2026-01-28 22:49:29 -06:00
committed by GitHub
parent 3e77103e8e
commit b722a0a3dc

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
# version.rb version 3.26 (for Chromebrew)
# version.rb version 3.27 (for Chromebrew)
OPTIONS = %w[-h --help -j --json -u --update-package-files -v --verbose -vv]
@@ -494,7 +494,7 @@ if filelist.length.positive?
end
updatable_string = (updatable_pkg[@pkg.name.to_sym] == 'Yes' ? 'Yes '.lightgreen : 'No '.lightred) if updatable_string.nil?
compile_string = @pkg.no_compile_needed? || @pkg.is_fake? ? 'No '.lightred : 'Yes '.lightgreen
autoupdate_string = File.file?("#{CREW_LIB_PATH}/tools/automatically_updatable_packages/#{@pkg.name.downcase}") ? 'No'.lightred : 'Yes'.lightgreen
autoupdate_string = File.file?("#{CREW_LIB_PATH}/tools/automatically_updatable_packages/#{@pkg.name}") ? 'Yes'.lightgreen : 'No'.lightred
versions.push(package: @pkg.name, update_status: versions_updated[@pkg.name.to_sym], version: cleaned_pkg_version, upstream_version: upstream_version)
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'