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
|
def tap arg
|
||||||
match = arg.match(%r[homebrew-(\w+)/])
|
match = arg.match(%r[homebrew-(\w+)/])
|
||||||
match[1] if match
|
match[1].downcase if match
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARGV.empty?
|
if ARGV.empty?
|
||||||
@ -31,7 +31,7 @@ ARGV.named.each do|arg|
|
|||||||
end
|
end
|
||||||
|
|
||||||
if tap url
|
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
|
else
|
||||||
Dir.chdir HOMEBREW_REPOSITORY
|
Dir.chdir HOMEBREW_REPOSITORY
|
||||||
end
|
end
|
||||||
@ -57,7 +57,7 @@ ARGV.named.each do|arg|
|
|||||||
|
|
||||||
safe_system 'git', *patch_args
|
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'
|
if issue and not ARGV.include? '--clean'
|
||||||
ohai "Patch closes issue ##{issue}"
|
ohai "Patch closes issue ##{issue}"
|
||||||
message = `git log HEAD^.. --format=%B`
|
message = `git log HEAD^.. --format=%B`
|
||||||
|
@ -88,7 +88,7 @@ end
|
|||||||
require 'metafiles'
|
require 'metafiles'
|
||||||
FORMULA_META_FILES = Metafiles.new
|
FORMULA_META_FILES = Metafiles.new
|
||||||
ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/troubleshooting"
|
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']
|
unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT']
|
||||||
$:.unshift(File.expand_path("#{__FILE__}/../compat"))
|
$:.unshift(File.expand_path("#{__FILE__}/../compat"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user