Merge pull request #12404 from FnControlOption/bump-cask-pr

bump-cask-pr: use version substring before comma unless they match
This commit is contained in:
Mike McQuaid 2021-11-09 16:11:20 +00:00 committed by GitHub
commit 0e0593418d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,6 +173,10 @@ module Homebrew
branch_name = "bump-#{cask.token}" branch_name = "bump-#{cask.token}"
commit_message = "Update #{cask.token}" commit_message = "Update #{cask.token}"
if new_version.present? if new_version.present?
if new_version.before_comma != old_version.before_comma
new_version = new_version.before_comma
old_version = old_version.before_comma
end
branch_name += "-#{new_version.tr(",:", "-")}" branch_name += "-#{new_version.tr(",:", "-")}"
commit_message += " from #{old_version} to #{new_version}" commit_message += " from #{old_version} to #{new_version}"
end end