diff options
| -rw-r--r-- | Library/Homebrew/cmd/pull.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb index 25abd9187..5ab329f73 100644 --- a/Library/Homebrew/cmd/pull.rb +++ b/Library/Homebrew/cmd/pull.rb @@ -141,13 +141,16 @@ module Homebrew end if ARGV.include? "--bottle" - bottle_branch = "pull-bottle-#{issue}" - safe_system "git", "checkout", "-B", bottle_branch, revision - if tap_name - pull_url "https://github.com/BrewTestBot/homebrew-#{tap_name}/compare/homebrew:master...pr-#{issue}" + bottle_commit_url = if tap_name + "https://github.com/BrewTestBot/homebrew-#{tap_name}/compare/homebrew:master...pr-#{issue}" else - pull_url "https://github.com/BrewTestBot/homebrew/compare/homebrew:master...pr-#{issue}" + "https://github.com/BrewTestBot/homebrew/compare/homebrew:master...pr-#{issue}" end + curl "--silent", "--fail", "-o", "/dev/null", "-I", bottle_commit_url + + bottle_branch = "pull-bottle-#{issue}" + safe_system "git", "checkout", "-B", bottle_branch, revision + pull_url bottle_commit_url safe_system "git", "rebase", branch safe_system "git", "checkout", branch safe_system "git", "merge", "--ff-only", "--no-edit", bottle_branch |
