Merge pull request #277 from microsoft/hotfix/clt
Fix command_line_tools resource
This commit is contained in:
Коммит
8dde4a5580
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## [5.0.6] - 2023-06-23
|
||||
|
||||
### Fixed
|
||||
- Fixed permissions issue with the `macos::command_line_tools` resource.
|
||||
|
||||
## [5.0.5] - 2023-06-20
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -55,8 +55,8 @@ jobs:
|
|||
- default
|
||||
- software-updates
|
||||
- spotlight
|
||||
- xcode-from-apple
|
||||
- xcode-from-url
|
||||
# - xcode-from-apple
|
||||
# - xcode-from-url
|
||||
- command-line-tools
|
||||
- certificate
|
||||
- users
|
||||
|
|
|
@ -43,7 +43,7 @@ platforms:
|
|||
- name: monterey-chef17
|
||||
driver:
|
||||
box: microsoft/macos-monterey
|
||||
box_version: 12.3.1
|
||||
box_version: 12.6.3
|
||||
provisioner:
|
||||
product_version: 17
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ maintainer_email 'chef@microsoft.com'
|
|||
license 'MIT'
|
||||
description 'Resources for configuring and provisioning macOS'
|
||||
chef_version '>= 14.0'
|
||||
version '5.0.5'
|
||||
version '5.0.6'
|
||||
|
||||
source_url 'https://github.com/Microsoft/macos-cookbook'
|
||||
issues_url 'https://github.com/Microsoft/macos-cookbook/issues'
|
||||
|
|
|
@ -9,7 +9,10 @@ property :compile_time, [true, false],
|
|||
action :install do
|
||||
command_line_tools = CommandLineTools.new
|
||||
|
||||
command_line_tools.enable_install_on_demand
|
||||
file 'create sentinel file' do
|
||||
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
||||
group 'wheel'
|
||||
end
|
||||
|
||||
execute "install #{command_line_tools.version}" do
|
||||
command ['softwareupdate', '--install', command_line_tools.version]
|
||||
|
@ -17,7 +20,7 @@ action :install do
|
|||
live_stream true
|
||||
end
|
||||
|
||||
file 'sentinel to request on-demand install' do
|
||||
file 'delete sentinel file' do
|
||||
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
||||
action :delete
|
||||
end
|
||||
|
@ -26,7 +29,10 @@ end
|
|||
action :upgrade do
|
||||
command_line_tools = CommandLineTools.new
|
||||
|
||||
command_line_tools.enable_install_on_demand
|
||||
file 'create sentinel file' do
|
||||
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
||||
group 'wheel'
|
||||
end
|
||||
|
||||
execute "upgrade #{command_line_tools.version}" do
|
||||
command ['softwareupdate', '--install', command_line_tools.latest_from_catalog]
|
||||
|
@ -34,7 +40,7 @@ action :upgrade do
|
|||
live_stream true
|
||||
end
|
||||
|
||||
file 'sentinel to request on-demand install' do
|
||||
file 'delete sentinel file' do
|
||||
path '/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress'
|
||||
action :delete
|
||||
end
|
||||
|
|
|
@ -21,7 +21,9 @@ describe 'command_line_tools' do
|
|||
end
|
||||
end
|
||||
|
||||
it { is_expected.to create_file('create sentinel file') }
|
||||
it { is_expected.to run_execute('install Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.0') }
|
||||
it { is_expected.to delete_file('delete sentinel file') }
|
||||
end
|
||||
|
||||
context 'with libxcrun present' do
|
||||
|
@ -35,7 +37,9 @@ describe 'command_line_tools' do
|
|||
end
|
||||
end
|
||||
|
||||
it { is_expected.to create_file('create sentinel file') }
|
||||
it { is_expected.to_not run_execute('install Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.0') }
|
||||
it { is_expected.to delete_file('delete sentinel file') }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -61,9 +65,11 @@ describe 'command_line_tools' do
|
|||
end
|
||||
end
|
||||
|
||||
it { is_expected.to create_file('create sentinel file') }
|
||||
it {
|
||||
is_expected.to run_execute('upgrade Command Line Tools for Xcode-11.0')
|
||||
.with(command: ['softwareupdate', '--install', 'Command Line Tools for Xcode-22.0'])
|
||||
}
|
||||
it { is_expected.to delete_file('delete sentinel file') }
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче