diff options
| author | Ian Lancaster | 2015-04-13 12:57:03 -0400 |
|---|---|---|
| committer | Xu Cheng | 2015-05-26 19:21:15 +0800 |
| commit | c327fdafa9d20434fd3000f5968fb405794c590d (patch) | |
| tree | 16ae306e83904851d70cc3e29c8aab5c688f1b0d /Library | |
| parent | cd63b740a50d67378b0f25f71c73aa11e27c2754 (diff) | |
| download | brew-c327fdafa9d20434fd3000f5968fb405794c590d.tar.bz2 | |
bottle: discard bottle revision from prior pkg_version
Closes Homebrew/homebrew#38628.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 713c8ca40..8d5229653 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -130,8 +130,9 @@ module Homebrew else ohai "Determining #{f.name} bottle revision..." versions = FormulaVersions.new(f) - max = versions.bottle_version_map("origin/master")[f.pkg_version].max - bottle_revision = max ? max + 1 : 0 + bottle_revisions = versions.bottle_version_map("origin/master")[f.pkg_version] + bottle_revisions.pop if bottle_revisions.last > 0 + bottle_revision = bottle_revisions.any? ? bottle_revisions.max + 1 : 0 end filename = Bottle::Filename.create(f, bottle_tag, bottle_revision) |
