feat: add linux support to bump-cask-pr

This commit is contained in:
Sean Molenaar 2025-03-17 11:58:00 +01:00
parent 7687ae3891
commit 4f7e45881d

View File

@ -192,11 +192,11 @@ module Homebrew
def replace_version_and_checksum(cask, new_hash, new_version, replacement_pairs)
# When blocks are absent, arch is not relevant. For consistency, we simulate the arm architecture.
system_options = if !cask.on_system_blocks_exist?
[:macos, :arm]
elsif cask.on_system_blocks_exist? && cask.os.nil?
[[:macos, :arm]]
elsif cask.on_system_blocks_exist? && cask.depends_on.macos
[:macos].product(OnSystem::ARCH_OPTIONS)
else
OnSystem::BASE_OS_OPTIONS.product(OnSystem::ARCH_OPTIONS) :
OnSystem::BASE_OS_OPTIONS.product(OnSystem::ARCH_OPTIONS)
end
system_options.each do |os, arch|