diff options
| author | Mike McQuaid | 2013-09-21 15:16:45 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2013-09-22 16:01:02 +0100 |
| commit | 19618bddd441afa0cfb55366902107bd144c1756 (patch) | |
| tree | 49ba0c4bd6813e1c52b48fa99b8e6497e52cc0ca /Library/Homebrew/cmd | |
| parent | c8832868407cad5156f20f09237e4db989314622 (diff) | |
| download | brew-19618bddd441afa0cfb55366902107bd144c1756.tar.bz2 | |
bottle: use versions to access previous bottles.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 584e8f215..84fb79cf6 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -2,6 +2,7 @@ require 'formula' require 'bottles' require 'tab' require 'keg' +require 'cmd/versions' class BottleMerger < Formula # This provides a URL and Version which are the only needed properties of @@ -50,8 +51,12 @@ module Homebrew extend self return ofail "Formula not installed with '--build-bottle': #{f.name}" end - bottle_revision = bottle_new_revision f - filename = bottle_filename f, bottle_revision + master_bottle_filenames = f.bottle_filenames 'origin/master' + bottle_revision = -1 + begin + bottle_revision += 1 + filename = bottle_filename(f, bottle_revision) + end while master_bottle_filenames.include? filename if bottle_filename_formula_name(filename).empty? return ofail "Add a new regex to bottle_version.rb to parse the bottle filename." |
