Skip to content

Commit 71f012a

Browse files
committed
fix: improve logging for changelog diff generation and cleanup process
1 parent 14255f0 commit 71f012a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

updater/scripts/get-changelog.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ try {
8282

8383
if ([string]::IsNullOrEmpty($fullDiff)) {
8484
Write-Host "No differences found between $OldTag and $NewTag"
85-
return ''
85+
return
86+
} else {
87+
Write-Host "Successfully created a changelog diff - $($fullDiff.Count) lines"
8688
}
8789

8890
# Extract only the added lines (lines starting with + but not ++)
@@ -130,6 +132,7 @@ try {
130132
$changelog += "`n`n> :warning: **Changelog content truncated by $($oldLength - $changelog.Length) characters because it was over the limit ($limit) and wouldn't fit into PR description.**"
131133
}
132134

135+
Write-Host "Final changelog length: $($changelog.Length) characters"
133136
return $changelog
134137
}
135138
}
@@ -142,8 +145,6 @@ try {
142145
if (Test-Path $tmpDir) {
143146
Write-Host 'Cleaning up temporary files...'
144147
Remove-Item -Recurse -Force -ErrorAction Continue $tmpDir
148+
Write-Host 'Cleanup complete.'
145149
}
146150
}
147-
148-
# Ensure clean exit
149-
exit 0

0 commit comments

Comments
 (0)