bottle: discard bottle revision from prior pkg_version
Closes Homebrew/homebrew#38628. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
cd63b740a5
commit
c327fdafa9
@ -130,8 +130,9 @@ module Homebrew
|
|||||||
else
|
else
|
||||||
ohai "Determining #{f.name} bottle revision..."
|
ohai "Determining #{f.name} bottle revision..."
|
||||||
versions = FormulaVersions.new(f)
|
versions = FormulaVersions.new(f)
|
||||||
max = versions.bottle_version_map("origin/master")[f.pkg_version].max
|
bottle_revisions = versions.bottle_version_map("origin/master")[f.pkg_version]
|
||||||
bottle_revision = max ? max + 1 : 0
|
bottle_revisions.pop if bottle_revisions.last > 0
|
||||||
|
bottle_revision = bottle_revisions.any? ? bottle_revisions.max + 1 : 0
|
||||||
end
|
end
|
||||||
|
|
||||||
filename = Bottle::Filename.create(f, bottle_tag, bottle_revision)
|
filename = Bottle::Filename.create(f, bottle_tag, bottle_revision)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user