Bump version to 2.0.1, update deployment strategy for central SPFx deployment, and enhance error handling in PowerShell script

This commit is contained in:
Torsten Brendgen
2026-07-19 23:42:36 +02:00
parent dd79e85725
commit e75b11117f
6 changed files with 23 additions and 23 deletions

View File

@@ -64,8 +64,15 @@ try {
foreach ($web in $site.AllWebs) {
try {
$webUrl = $web.Url
$userCustomActions = $web.UserCustomActions
if ($null -eq $userCustomActions) {
throw ('UserCustomActions konnten fuer das Web nicht geladen werden: ' + $webUrl)
}
$actions = @(
$web.UserCustomActions |
$userCustomActions |
Where-Object {
$_.ClientSideComponentId -eq $componentId -or
$_.ClientSideComponentId -eq $legacyComponentId
@@ -88,7 +95,7 @@ try {
}
if (-not $currentAction) {
$currentAction = $web.UserCustomActions.Add()
$currentAction = $userCustomActions.Add()
$currentAction.Name = [Guid]::NewGuid().ToString('B')
$created++
}
@@ -105,7 +112,7 @@ try {
$currentAction.Update()
$web.Update()
Write-Host ('MegaMenu synchronisiert: ' + $web.Url) -ForegroundColor Green
Write-Host ('MegaMenu synchronisiert: ' + $webUrl) -ForegroundColor Green
}
finally {
$web.Dispose()