aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-12-12 18:42:44 +0000
committerMike McQuaid2013-12-12 18:45:17 +0000
commit01c2d40f6c9a7b9616cc25d2139e70bd0ca4fc20 (patch)
treed4871c16c002f45fea1cf8ecd69920a31e95eccb /Library
parente523262dfa2f10807ae686f9e8833f6751bfe1e0 (diff)
downloadbrew-01c2d40f6c9a7b9616cc25d2139e70bd0ca4fc20.tar.bz2
brew-pull: add --bottle to pull from BrewTestBot.
Diffstat (limited to 'Library')
-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