Skip to content

Commit

Permalink
Display old and new version numbers when updating
Browse files Browse the repository at this point in the history
  • Loading branch information
apainintheneck committed Apr 14, 2022
1 parent cc6a91f commit f811774
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Library/Homebrew/cmd/update-report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def output_update_report

if initial_revision != current_revision
update_preinstall_header args: args
puts "Updated Homebrew from #{shorten_revision(initial_revision)} to #{shorten_revision(current_revision)}."

updated = true

old_tag = Settings.read "latesttag"
Expand All @@ -133,7 +133,13 @@ def output_update_report
"git", "-C", HOMEBREW_REPOSITORY, "tag", "--list", "--sort=-version:refname", "*.*"
).lines.first.chomp

new_repository_version = new_tag if new_tag != old_tag
if old_tag.blank? || (new_tag == old_tag)
puts "Updated Homebrew from #{shorten_revision(initial_revision)} to #{shorten_revision(current_revision)}."
else
new_repository_version = new_tag
puts "Updated Homebrew from #{old_tag} (#{shorten_revision(initial_revision)}) " \
"to #{new_tag} (#{shorten_revision(current_revision)})."
end
end

Homebrew.failed = true if ENV["HOMEBREW_UPDATE_FAILED"]
Expand Down

0 comments on commit f811774

Please sign in to comment.