brew-pull: fix third-party taps
Closes Homebrew/homebrew#17588. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
1283bd8381
commit
a79721e59d
@ -6,7 +6,7 @@ require 'formula'
|
||||
|
||||
def tap arg
|
||||
match = arg.match(%r[homebrew-(\w+)/])
|
||||
match[1] if match
|
||||
match[1].downcase if match
|
||||
end
|
||||
|
||||
if ARGV.empty?
|
||||
@ -31,7 +31,7 @@ ARGV.named.each do|arg|
|
||||
end
|
||||
|
||||
if tap url
|
||||
Dir.chdir HOMEBREW_REPOSITORY/"Library/Taps/homebrew-#{tap url}"
|
||||
Dir.chdir HOMEBREW_REPOSITORY/"Library/Taps/#{url_match[1].downcase}-#{tap url}"
|
||||
else
|
||||
Dir.chdir HOMEBREW_REPOSITORY
|
||||
end
|
||||
@ -57,7 +57,7 @@ ARGV.named.each do|arg|
|
||||
|
||||
safe_system 'git', *patch_args
|
||||
|
||||
issue = arg.to_i > 0 ? arg.to_i : url_match[3]
|
||||
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`
|
||||
|
@ -88,7 +88,7 @@ end
|
||||
require 'metafiles'
|
||||
FORMULA_META_FILES = Metafiles.new
|
||||
ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/troubleshooting"
|
||||
HOMEBREW_PULL_URL_REGEX = 'https:\/\/github.com\/\w+\/homebrew(-\w+)?\/(pull\/(\d+)|commit\/\w{4,40})'
|
||||
HOMEBREW_PULL_URL_REGEX = 'https:\/\/github.com\/(\w+)\/homebrew(-\w+)?\/(pull\/(\d+)|commit\/\w{4,40})'
|
||||
|
||||
unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT']
|
||||
$:.unshift(File.expand_path("#{__FILE__}/../compat"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user