Skip to content
Snippets Groups Projects
Commit b9d5b11f authored by Mike McQuaid's avatar Mike McQuaid
Browse files

update-test: check we end up at end commit.

This would have caught the bug fixed in 985c67.
parent 985c672b
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ module Homebrew
else
Utils.popen_read("git", "rev-parse", "origin/master").chomp
end
start_sha1 = Utils.popen_read("git", "rev-parse", start_sha1).chomp
end_sha1 = Utils.popen_read("git", "rev-parse", "HEAD").chomp
puts "Start commit: #{start_sha1}"
......@@ -47,6 +48,15 @@ module Homebrew
# run brew update
oh1 "Running brew update..."
safe_system "brew", "update", "--verbose"
actual_end_sha1 = Utils.popen_read("git", "rev-parse", "master").chomp
if actual_end_sha1 != end_sha1
raise <<-EOS.undent
brew update didn't update master!
Start commit: #{start_sha1}
Expected end commit: #{end_sha1}
Actual end commit: #{actual_end_sha1}
EOS
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment