update-test: check we end up at end commit.
This would have caught the bug fixed in 985c67.
This commit is contained in:
parent
985c672bac
commit
b9d5b11f32
@ -16,6 +16,7 @@ module Homebrew
|
|||||||
else
|
else
|
||||||
Utils.popen_read("git", "rev-parse", "origin/master").chomp
|
Utils.popen_read("git", "rev-parse", "origin/master").chomp
|
||||||
end
|
end
|
||||||
|
start_sha1 = Utils.popen_read("git", "rev-parse", start_sha1).chomp
|
||||||
end_sha1 = Utils.popen_read("git", "rev-parse", "HEAD").chomp
|
end_sha1 = Utils.popen_read("git", "rev-parse", "HEAD").chomp
|
||||||
|
|
||||||
puts "Start commit: #{start_sha1}"
|
puts "Start commit: #{start_sha1}"
|
||||||
@ -47,6 +48,15 @@ module Homebrew
|
|||||||
# run brew update
|
# run brew update
|
||||||
oh1 "Running brew update..."
|
oh1 "Running brew update..."
|
||||||
safe_system "brew", "update", "--verbose"
|
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
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user