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

pull: check bottle commit URL before branching.

Otherwise we annoyingly end up on a branch unnecessarily.
parent 40e64263
No related branches found
No related tags found
No related merge requests found
...@@ -141,13 +141,16 @@ module Homebrew ...@@ -141,13 +141,16 @@ module Homebrew
end end
if ARGV.include? "--bottle" if ARGV.include? "--bottle"
bottle_branch = "pull-bottle-#{issue}" bottle_commit_url = if tap_name
safe_system "git", "checkout", "-B", bottle_branch, revision "https://github.com/BrewTestBot/homebrew-#{tap_name}/compare/homebrew:master...pr-#{issue}"
if tap_name
pull_url "https://github.com/BrewTestBot/homebrew-#{tap_name}/compare/homebrew:master...pr-#{issue}"
else else
pull_url "https://github.com/BrewTestBot/homebrew/compare/homebrew:master...pr-#{issue}" "https://github.com/BrewTestBot/homebrew/compare/homebrew:master...pr-#{issue}"
end 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", "rebase", branch
safe_system "git", "checkout", branch safe_system "git", "checkout", branch
safe_system "git", "merge", "--ff-only", "--no-edit", bottle_branch safe_system "git", "merge", "--ff-only", "--no-edit", bottle_branch
......
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