Merge pull request #282 from microsoft/user/mswartz/AddLatestOS
User/mswartz/add latest os
This commit is contained in:
Коммит
ca54eb61c6
|
@ -66,7 +66,7 @@ jobs:
|
|||
venturaPlus: true
|
||||
platforms:
|
||||
- ventura-x86
|
||||
# - ventura-arm
|
||||
- sonoma-x86
|
||||
suites: ${{ parameters.kitchenSuites }}
|
||||
- template: test-kitchen.yml@templates
|
||||
parameters:
|
||||
|
@ -75,4 +75,4 @@ jobs:
|
|||
platforms:
|
||||
- big-sur-x86
|
||||
- monterey-x86
|
||||
suites: ${{ parameters.kitchenSuites }}
|
||||
suites: ${{ parameters.kitchenSuites }}
|
|
@ -36,6 +36,14 @@ platforms:
|
|||
driver:
|
||||
box: microsoft/macos-ventura-arm
|
||||
|
||||
- name: sonoma-x86
|
||||
driver:
|
||||
box: microsoft/macos-sonoma
|
||||
|
||||
- name: sonoma-arm
|
||||
driver:
|
||||
box: microsoft/macos-sonoma-arm
|
||||
|
||||
suites:
|
||||
- name: software-updates
|
||||
provisioner:
|
||||
|
|
|
@ -9,6 +9,31 @@ property :settings, Hash
|
|||
property :system, [true, false]
|
||||
property :user, String
|
||||
|
||||
action_class do
|
||||
def convert_to_string_from_data_type(value)
|
||||
case value
|
||||
when Array
|
||||
"-array #{value.map { |x| convert_to_string_from_data_type(x) }.join(' ')}"
|
||||
when Integer
|
||||
"-integer #{value}"
|
||||
when FalseClass
|
||||
"-bool #{value}"
|
||||
when TrueClass
|
||||
"-bool #{value}"
|
||||
when Hash
|
||||
"-dict #{value.map do |k, v|
|
||||
Shellwords.shellescape(k) + ' ' + convert_to_string_from_data_type(v)
|
||||
end.join(' ')}"
|
||||
when String
|
||||
"-string #{Shellwords.shellescape(value)}"
|
||||
when Float
|
||||
"-float #{value}"
|
||||
else
|
||||
raise "Unknown or unsupported data type: #{value} of #{value.class}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
action :run do
|
||||
new_resource.option = 'read' if new_resource.read_only
|
||||
new_resource.settings.each do |setting, value|
|
||||
|
|
Загрузка…
Ссылка в новой задаче