Merge pull request #8133 from Homebrew/another-fix

pr-upload: use PkgVersion.parse instead of Version.new
This commit is contained in:
Jonathan Chang 2020-07-29 20:13:06 +10:00 committed by GitHub
commit 28554db563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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