Fix release notes for nuget package

This commit is contained in:
Tiago Conceição
2022-04-02 03:39:30 +01:00
parent caa37436db
commit 3c5d231290
3 changed files with 16 additions and 3 deletions
+3 -2
View File
@@ -284,8 +284,8 @@ $foundHashTag = $false
$sb = [System.Text.StringBuilder]::new()
foreach($line in $changelog) {
$line = $line.TrimEnd()
if($line -eq '') { continue }
if($line.StartsWith("##")) {
if([string]::IsNullOrWhiteSpace($line)) { continue }
if($line.StartsWith('##')) {
if(!$foundHashTag)
{
$foundHashTag = $true
@@ -298,6 +298,7 @@ foreach($line in $changelog) {
}
}
Write-Host $sb.ToString()
Set-Content -Path "UVtools.Core/RELEASE_NOTES.md" -Value $sb.ToString()
if($null -ne $enableNugetPublish -and $enableNugetPublish)