bump-formula-pr: ignore --version argument if equal to detected version

This commit is contained in:
Dawid Dziurla 2020-03-13 17:09:58 +01:00
parent b9aa76a9ba
commit 8db863ff7e
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -194,7 +194,13 @@ module Homebrew
resource = Resource.new { @url = new_url }
resource.download_strategy = DownloadStrategyDetector.detect_from_url(new_url)
resource.owner = Resource.new(formula.name)
resource.version = forced_version if forced_version
if forced_version
if forced_version == resource.version
forced_version = nil
else
resource.version = forced_version
end
end
odie "No --version= argument specified!" unless resource.version
resource_path = resource.fetch
tar_file_extensions = %w[.tar .tb2 .tbz .tbz2 .tgz .tlz .txz .tZ]