Skip to content

Commit

Permalink
Merged PR 25348: Fix the template that creates GitHub draft release
Browse files Browse the repository at this point in the history
Fix the template that creates GitHub draft release
  • Loading branch information
daxian-dbw committed Apr 13, 2023
1 parent 395b941 commit 252ba19
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -66,17 +66,17 @@ steps:
"preview.md"
}
else {
$semanticVersion.Major + "." + $semanticVersion.Minor + ".md"
$semanticVersion.Major.ToString() + "." + $semanticVersion.Minor.ToString() + ".md"
}
$filePath = $env:BUILD_SOURCESDIRECTORY/CHANGELOG/$fileName
$filePath = "$env:BUILD_SOURCESDIRECTORY/CHANGELOG/$fileName"
Write-Verbose -Verbose "Selected Log file: $filePath"
if (-not (Test-Path $filePath)) {
throw "$filePath not found"
}
$changelog = Get-Content -Raw -Path $filePath
$changelog = Get-Content -Path $filePath
$startPattern = "^## \[" + ([regex]::Escape($releaseVersion)) + "\]"
$endPattern = "^## \[{0}\.{1}\.{2}*" -f $semanticVersion.Major, $semanticVersion.Minor, $semanticVersion.Patch
Expand All @@ -85,9 +85,9 @@ steps:
if ($_ -match $startPattern) { $outputLine = $true }
elseif ($_ -match $endPattern) { $outputLine = $false }
if ($outputLine) { $_}
}
} | Out-String
Write-Verbose -Verbose "Selected content: `n$clContent"
Publish-ReleaseDraft -Tag '$(ReleaseTag)' -Name '$(ReleaseTag) Release of PowerShell' -Description $clContent -User PowerShell -Repository PowerShell -PackageFolder $(System.ArtifactsDirectory) -Token $(GitHubReleasePat)
Publish-ReleaseDraft -Tag '$(ReleaseTag)' -Name '$(ReleaseTag) Release of PowerShell' -Description $clContent -User PowerShell -Repository PowerShell -PackageFolder $(PackagesRoot) -Token $(GitHubReleasePat)
displayName: Publish Release Draft

0 comments on commit 252ba19

Please sign in to comment.