mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-15 19:56:59 +08:00
bottle_resolve_version: return PkgVersion
This commit is contained in:
parent
2751449abb
commit
602ea66a0f
@ -58,7 +58,7 @@ def bottle_resolve_formula_names bottle_file
|
|||||||
end
|
end
|
||||||
|
|
||||||
def bottle_resolve_version bottle_file
|
def bottle_resolve_version bottle_file
|
||||||
Version.new bottle_receipt_path(bottle_file).split("/")[1]
|
PkgVersion.parse bottle_receipt_path(bottle_file).split("/")[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
class Bintray
|
class Bintray
|
||||||
|
@ -83,7 +83,13 @@ module Homebrew
|
|||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
if f.version > version || ARGV.switch?('s') && !f.installed? || bottle_file_outdated?(f, file)
|
file_is_stale = if PkgVersion === version
|
||||||
|
f.pkg_version > version
|
||||||
|
else
|
||||||
|
f.version > version
|
||||||
|
end
|
||||||
|
|
||||||
|
if file_is_stale || ARGV.switch?('s') && !f.installed? || bottle_file_outdated?(f, file)
|
||||||
cleanup_path(file) { file.unlink }
|
cleanup_path(file) { file.unlink }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user