cask: ignore minimum macOS in on_os blocks for variations
This commit is contained in:
parent
14d452fcde
commit
1ef1b0b556
@ -440,7 +440,9 @@ module Cask
|
|||||||
MacOSVersion::SYMBOLS.keys.product(OnSystem::ARCH_OPTIONS).each do |os, arch|
|
MacOSVersion::SYMBOLS.keys.product(OnSystem::ARCH_OPTIONS).each do |os, arch|
|
||||||
bottle_tag = ::Utils::Bottles::Tag.new(system: os, arch:)
|
bottle_tag = ::Utils::Bottles::Tag.new(system: os, arch:)
|
||||||
next unless bottle_tag.valid_combination?
|
next unless bottle_tag.valid_combination?
|
||||||
next if depends_on.macos && !depends_on.macos.allows?(bottle_tag.to_macos_version)
|
next if depends_on.macos &&
|
||||||
|
!@dsl.depends_on_set_in_block? &&
|
||||||
|
!depends_on.macos.allows?(bottle_tag.to_macos_version)
|
||||||
|
|
||||||
Homebrew::SimulateSystem.with(os:, arch:) do
|
Homebrew::SimulateSystem.with(os:, arch:) do
|
||||||
refresh
|
refresh
|
||||||
|
|||||||
@ -95,6 +95,7 @@ module Cask
|
|||||||
:livecheck,
|
:livecheck,
|
||||||
:livecheckable?,
|
:livecheckable?,
|
||||||
:on_system_blocks_exist?,
|
:on_system_blocks_exist?,
|
||||||
|
:depends_on_set_in_block?,
|
||||||
*ORDINARY_ARTIFACT_CLASSES.map(&:dsl_key),
|
*ORDINARY_ARTIFACT_CLASSES.map(&:dsl_key),
|
||||||
*ACTIVATABLE_ARTIFACT_CLASSES.map(&:dsl_key),
|
*ACTIVATABLE_ARTIFACT_CLASSES.map(&:dsl_key),
|
||||||
*ARTIFACT_BLOCK_CLASSES.flat_map { |klass| [klass.dsl_key, klass.uninstall_dsl_key] },
|
*ARTIFACT_BLOCK_CLASSES.flat_map { |klass| [klass.dsl_key, klass.uninstall_dsl_key] },
|
||||||
@ -105,7 +106,7 @@ module Cask
|
|||||||
|
|
||||||
attr_reader :cask, :token, :deprecation_date, :deprecation_reason, :disable_date, :disable_reason
|
attr_reader :cask, :token, :deprecation_date, :deprecation_reason, :disable_date, :disable_reason
|
||||||
|
|
||||||
attr_predicate :on_system_blocks_exist?, :deprecated?, :disabled?, :livecheckable?
|
attr_predicate :deprecated?, :disabled?, :livecheckable?, :on_system_blocks_exist?, :depends_on_set_in_block?
|
||||||
|
|
||||||
def initialize(cask)
|
def initialize(cask)
|
||||||
@cask = cask
|
@cask = cask
|
||||||
@ -353,6 +354,7 @@ module Cask
|
|||||||
# @api public
|
# @api public
|
||||||
def depends_on(**kwargs)
|
def depends_on(**kwargs)
|
||||||
@depends_on ||= DSL::DependsOn.new
|
@depends_on ||= DSL::DependsOn.new
|
||||||
|
@depends_on_set_in_block = true if @called_in_on_system_block
|
||||||
return @depends_on if kwargs.empty?
|
return @depends_on if kwargs.empty?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user