aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorMike McQuaid2016-10-02 17:16:35 +0100
committerMike McQuaid2016-10-02 17:16:35 +0100
commitc6f5d24238c452ad5f13d597ff613e5477abb14a (patch)
treede19c675fbe56995e6b829612ee419d2e49ea5a6 /Library/Homebrew/dev-cmd
parentf90f52d90236ca64edf0e979145bbdbd80c165d1 (diff)
downloadbrew-c6f5d24238c452ad5f13d597ff613e5477abb14a.tar.bz2
update-test: fix tag updating, skip core tap.
Fix updating the `stable` branch used for tagged updates and ensure that the core tap isn’t retapped (the slowest part by far of this test).
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/update-test.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb
index 8d0391f66..79b9f621b 100644
--- a/Library/Homebrew/dev-cmd/update-test.rb
+++ b/Library/Homebrew/dev-cmd/update-test.rb
@@ -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}