From fe47566f8185d2a9590cffdecbd826b3d5925a4e Mon Sep 17 00:00:00 2001 From: Trent Blackburn Date: Wed, 20 May 2026 20:42:19 -0400 Subject: [PATCH 1/2] ci(release): make UpdateReleaseNotes manifest write non-fatal Backports the guard added during the PlexAutomationToolkit rollout review: the task is documented as non-fatal, but the final Update-ModuleManifest -ErrorAction Stop was unguarded, so a failure (e.g. missing built manifest) would hard-fail Publish. Add a Test-Path check for the built manifest and wrap the update in try/catch that warns and leaves the existing ReleaseNotes in place, keeping the release unblocked as intended. Co-Authored-By: Claude Opus 4.7 (1M context) --- build.psake.ps1 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/build.psake.ps1 b/build.psake.ps1 index cc5f0ce..aae3104 100644 --- a/build.psake.ps1 +++ b/build.psake.ps1 @@ -82,8 +82,19 @@ Task -Name 'UpdateReleaseNotes' -Depends 'Build' -Description 'Set built manifes return } $builtManifest = Join-Path -Path $PSBPreference.Build.ModuleOutDir -ChildPath "$($PSBPreference.General.ModuleName).psd1" - Update-ModuleManifest -Path $builtManifest -ReleaseNotes $releaseNotes -ErrorAction Stop - Write-Host " Set ReleaseNotes on built manifest from CHANGELOG [$($releaseEntry.Version)] ($($releaseNotes.Length) chars)" -ForegroundColor Gray + if (-not (Test-Path -Path $builtManifest)) { + Write-Warning "Built manifest not found at '$builtManifest'; leaving ReleaseNotes unchanged." + return + } + try { + Update-ModuleManifest -Path $builtManifest -ReleaseNotes $releaseNotes -ErrorAction Stop + Write-Host " Set ReleaseNotes on built manifest from CHANGELOG [$($releaseEntry.Version)] ($($releaseNotes.Length) chars)" -ForegroundColor Gray + } + catch { + # Keep publishing unblocked: a failure here just leaves the manifest's existing + # ReleaseNotes in place rather than aborting the release. + Write-Warning "Failed to set ReleaseNotes on the built manifest ($($_.Exception.Message)); leaving it unchanged." + } } # Inject ReleaseNotes into the built manifest before publishing (PowerShellBuild's Publish From 2261f7271b14b58a20a84a872bc4f25435b9d821 Mon Sep 17 00:00:00 2001 From: Trent Blackburn Date: Wed, 20 May 2026 23:10:59 -0400 Subject: [PATCH 2/2] ci(release): include manifest path in the ReleaseNotes-write failure warning Addresses the #32 review nit: the catch warning now names the built manifest (like the missing-path warning) so logs identify which file failed to update. Co-Authored-By: Claude Opus 4.7 (1M context) --- build.psake.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.psake.ps1 b/build.psake.ps1 index aae3104..1f2b47b 100644 --- a/build.psake.ps1 +++ b/build.psake.ps1 @@ -93,7 +93,7 @@ Task -Name 'UpdateReleaseNotes' -Depends 'Build' -Description 'Set built manifes catch { # Keep publishing unblocked: a failure here just leaves the manifest's existing # ReleaseNotes in place rather than aborting the release. - Write-Warning "Failed to set ReleaseNotes on the built manifest ($($_.Exception.Message)); leaving it unchanged." + Write-Warning "Failed to set ReleaseNotes on the built manifest '$builtManifest' ($($_.Exception.Message)); leaving it unchanged." } }