aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2013-12-12 18:42:44 +0000
committerMike McQuaid2013-12-12 18:45:17 +0000
commitd1bce611e0434b00e9ebee42a1d592dcd3bd5a04 (patch)
treec58a04622008f2bb345d4755eb9acc960944fb8b
parent7ad0525722fd609523d247b7088b817e9b21077e (diff)
downloadhomebrew-d1bce611e0434b00e9ebee42a1d592dcd3bd5a04.tar.bz2
brew-pull: add --bottle to pull from BrewTestBot.
-rwxr-xr-xLibrary/Contributions/cmd/brew-pull.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/Library/Contributions/cmd/brew-pull.rb b/Library/Contributions/cmd/brew-pull.rb
index ee20e7720..0922917a2 100755
--- a/Library/Contributions/cmd/brew-pull.rb
+++ b/Library/Contributions/cmd/brew-pull.rb
@@ -36,6 +36,13 @@ ARGV.named.each do|arg|
Dir.chdir HOMEBREW_REPOSITORY
end
+ issue = arg.to_i > 0 ? arg.to_i : url_match[4]
+
+ if ARGV.include? '--bottle'
+ raise 'No pull request detected!' unless issue
+ url = "https://github.com/BrewTestBot/homebrew/compare/mxcl:master...pr-#{issue}"
+ end
+
# GitHub provides commits'/pull-requests' raw patches using this URL.
url += '.patch'
@@ -66,7 +73,6 @@ ARGV.named.each do|arg|
odie 'Patch failed to apply: aborted.'
end
- issue = arg.to_i > 0 ? arg.to_i : url_match[4]
if issue and not ARGV.include? '--clean'
ohai "Patch closes issue ##{issue}"
message = `git log HEAD^.. --format=%B`
@@ -83,6 +89,9 @@ ARGV.named.each do|arg|
ohai 'Patch changed:'
safe_system 'git', '--no-pager', 'diff', "#{revision}..", '--stat'
+ if ARGV.include? '--bottle'
+ end
+
if ARGV.include? '--install'
`git diff #{revision}.. --name-status`.each_line do |line|
status, filename = line.split