Skip to content

Commit

Permalink
Update anka clean script (actions#8537)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-Ayupov authored Oct 12, 2023
1 parent eff24a9 commit cde475b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions images.CI/macos/anka/CreateCleanAnkaTemplate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function Invoke-SoftwareUpdate {

Write-Host "`t[*] Fetching Software Updates ready to install on '$TemplateName' VM:"
Show-StringWithFormat $newUpdates
$listOfNewUpdates = $($($newUpdates.Split("*")).Split("Title") | Where-Object {$_ -match "Label:"}).Replace("Label: ", '')
$listOfNewUpdates = $($($newUpdates.Split("*")).Split("Title") | Where-Object {$_ -match "Label:"}).Replace("Label: ", '') | Where-Object {$_ -notmatch "macOS Sonoma"}
Write-Host "`t[*] Installing Software Updates on '$TemplateName' VM:"
Install-SoftwareUpdate -HostName $ipAddress -listOfUpdates $listOfNewUpdates -Password $Password | Show-StringWithFormat

Expand All @@ -99,7 +99,7 @@ function Invoke-SoftwareUpdate {
$listOfNewUpdates = $newUpdates.split('*').Trim('')
foreach ($newupdate in $listOfNewUpdates) {
# Will be True if the value is not Venture, not empty, and contains "Action: restart" words
if ($newupdate.Contains("Action: restart") -and !$newupdate.Contains("macOS Ventura") -and (-not [String]::IsNullOrEmpty($newupdate))) {
if ($newupdate.Contains("Action: restart") -and (!$newupdate.Contains("macOS Ventura") -or !$newupdate.Contains("macOS Sonoma")) -and (-not [String]::IsNullOrEmpty($newupdate))) {
Write-Host "`t[*] Sleep 60 seconds before the software updates have been installed"
Start-Sleep -Seconds 60

Expand Down

0 comments on commit cde475b

Please sign in to comment.