Skip to content
Snippets Groups Projects
Commit 602ea66a authored by Xu Cheng's avatar Xu Cheng
Browse files

bottle_resolve_version: return PkgVersion

parent 2751449a
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ def bottle_resolve_formula_names bottle_file
end
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
class Bintray
......
......@@ -83,7 +83,13 @@ module Homebrew
next
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 }
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment