new method bottle_resolve_formula_names
Also remove bottle_filename_formula_name
This commit is contained in:
parent
129f780bba
commit
557ddcac36
@ -38,11 +38,19 @@ def bottle_tag
|
||||
end
|
||||
end
|
||||
|
||||
def bottle_filename_formula_name filename
|
||||
path = Pathname.new filename
|
||||
version = BottleVersion.parse(path).to_s
|
||||
basename = path.basename.to_s
|
||||
basename.rpartition("-#{version}").first
|
||||
def bottle_resolve_formula_names bottle_file
|
||||
receipt_file_path = Utils.popen_read("tar", "-tzf", bottle_file, "*/*/INSTALL_RECEIPT.json").chomp
|
||||
receipt_file = Utils.popen_read("tar", "-xOzf", bottle_file, receipt_file_path)
|
||||
name = receipt_file_path.split("/").first
|
||||
tap = Tab.from_file_content(receipt_file, "#{bottle_file}/#{receipt_file_path}").tap
|
||||
|
||||
if tap.nil? || tap == "Homebrew/homebrew" || tap == "mxcl/master"
|
||||
full_name = name
|
||||
else
|
||||
full_name = "#{tap.sub("homebrew-", "")}/#{name}"
|
||||
end
|
||||
|
||||
[name, full_name]
|
||||
end
|
||||
|
||||
class Bintray
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user