mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
handle mxcl/master synonym inside Tab#from_file_content
This commit is contained in:
parent
8faaba6665
commit
8f0249e9a1
@ -48,7 +48,7 @@ def bottle_resolve_formula_names bottle_file
|
|||||||
name = receipt_file_path.split("/").first
|
name = receipt_file_path.split("/").first
|
||||||
tap = Tab.from_file_content(receipt_file, "#{bottle_file}/#{receipt_file_path}").tap
|
tap = Tab.from_file_content(receipt_file, "#{bottle_file}/#{receipt_file_path}").tap
|
||||||
|
|
||||||
if tap.nil? || tap == "Homebrew/homebrew" || tap == "mxcl/master"
|
if tap.nil? || tap == "Homebrew/homebrew"
|
||||||
full_name = name
|
full_name = name
|
||||||
else
|
else
|
||||||
full_name = "#{tap.sub("homebrew-", "")}/#{name}"
|
full_name = "#{tap.sub("homebrew-", "")}/#{name}"
|
||||||
@ -67,7 +67,7 @@ class Bintray
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.repository(tap=nil)
|
def self.repository(tap=nil)
|
||||||
return "bottles" if tap.nil? || tap == "Homebrew/homebrew" || tap == "mxcl/master"
|
return "bottles" if tap.nil? || tap == "Homebrew/homebrew"
|
||||||
"bottles-#{tap.sub(/^homebrew\/(homebrew-)?/i, "")}"
|
"bottles-#{tap.sub(/^homebrew\/(homebrew-)?/i, "")}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -186,7 +186,7 @@ class Formulary
|
|||||||
tap = tab.tap
|
tap = tab.tap
|
||||||
spec ||= tab.spec
|
spec ||= tab.spec
|
||||||
|
|
||||||
if tap.nil? || tap == "Homebrew/homebrew" || tap == "mxcl/master"
|
if tap.nil? || tap == "Homebrew/homebrew"
|
||||||
factory(rack.basename.to_s, spec)
|
factory(rack.basename.to_s, spec)
|
||||||
else
|
else
|
||||||
factory("#{tap.sub("homebrew-", "")}/#{rack.basename}", spec)
|
factory("#{tap.sub("homebrew-", "")}/#{rack.basename}", spec)
|
||||||
|
@ -43,6 +43,10 @@ class Tab < OpenStruct
|
|||||||
tapped_from = attributes["tapped_from"]
|
tapped_from = attributes["tapped_from"]
|
||||||
unless tapped_from.nil? || tapped_from == "path or URL"
|
unless tapped_from.nil? || tapped_from == "path or URL"
|
||||||
attributes["source"]["tap"] = attributes.delete("tapped_from")
|
attributes["source"]["tap"] = attributes.delete("tapped_from")
|
||||||
|
|
||||||
|
if attributes["source"]["tap"] == "mxcl/master"
|
||||||
|
attributes["source"]["tap"] == "Homebrew/homebrew"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if attributes["source"]["spec"].nil?
|
if attributes["source"]["spec"].nil?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user