Skip to content
Snippets Groups Projects
Commit 4f916cdf authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #1212 from MikeMcQuaid/update-test-fix

update-test: fix tag updating, skip core tap.
parents f90f52d9 c6f5d242
No related branches found
No related tags found
No related merge requests found
......@@ -113,6 +113,7 @@ module Homebrew
end
def install_core_tap_if_necessary
return if ENV["HOMEBREW_UPDATE_TEST"]
core_tap = CoreTap.instance
return if core_tap.installed?
CoreTap.ensure_installed! quiet: false
......
......@@ -16,7 +16,14 @@
module Homebrew
def update_test
ENV["HOMEBREW_UPDATE_TO_TAG"] = "1" if ARGV.include?("--to-tag")
ENV["HOMEBREW_UPDATE_TEST"] = "1"
if ARGV.include?("--to-tag")
ENV["HOMEBREW_UPDATE_TO_TAG"] = "1"
branch = "stable"
else
branch = "master"
end
cd HOMEBREW_REPOSITORY
start_commit = if commit = ARGV.value("commit")
......@@ -57,10 +64,10 @@ module Homebrew
# run brew update
oh1 "Running brew update..."
safe_system "brew", "update", "--verbose"
actual_end_commit = Utils.popen_read("git", "rev-parse", "master").chomp
actual_end_commit = Utils.popen_read("git", "rev-parse", branch).chomp
if start_commit != end_commit && start_commit == actual_end_commit
raise <<-EOS.undent
brew update didn't update master!
brew update didn't update #{branch}!
Start commit: #{start_commit}
Expected end commit: #{end_commit}
Actual end commit: #{actual_end_commit}
......
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