pr-upload: use PkgVersion.parse instead of Version.new

This commit is contained in:
Dawid Dziurla 2020-07-29 11:11:29 +02:00
parent 7713e92fb0
commit 6fe56c33ff
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -40,7 +40,7 @@ module Homebrew
hashes.each do |name, hash|
formula_path = HOMEBREW_REPOSITORY/hash["formula"]["path"]
formula_version = Formulary.factory(formula_path).pkg_version
bottle_version = Version.new hash["formula"]["pkg_version"]
bottle_version = PkgVersion.parse hash["formula"]["pkg_version"]
next if formula_version == bottle_version
odie "Bottles are for #{name} #{bottle_version} but formula is version #{formula_version}!"