diff options
| author | Xu Cheng | 2015-12-06 22:37:06 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-12-09 16:56:59 +0800 |
| commit | 8b510f82c47899b18bd78f197ac0d02d0b691f0e (patch) | |
| tree | 0d039d4f960be2a019742a92206f12b9f617578c /Library | |
| parent | b100ad223d24bef79bc2e40491b68aa06c434465 (diff) | |
| download | brew-8b510f82c47899b18bd78f197ac0d02d0b691f0e.tar.bz2 | |
bottles: tap is a Tap object now
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/bottles.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index 7acf712ee..07e96e210 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -47,10 +47,10 @@ def bottle_resolve_formula_names(bottle_file) 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" + if tap.nil? || tap.core_formula_repository? full_name = name else - full_name = "#{tap.sub("homebrew-", "")}/#{name}" + full_name = "#{tap}/#{name}" end [name, full_name] @@ -66,8 +66,11 @@ class Bintray end def self.repository(tap = nil) - return "bottles" if tap.nil? || tap == "Homebrew/homebrew" - "bottles-#{tap.sub(%r{^homebrew/(homebrew-)?}i, "")}" + if tap.nil? || tap.core_formula_repository? + "bottles" + else + "bottles-#{tap.repo}" + end end end |
