Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f4c0cc

Browse files
jshigetomiJustin Chung
authored andcommitted
Fix Changelog content grab during GitHub Release (#24788)
Co-authored-by: Justin Chung <chungjustin@microsoft.com>
1 parent79e4cba commit7f4c0cc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

‎.pipelines/templates/release-githubtasks.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,12 @@ jobs:
7474
7575
$changelog = Get-Content -Path $filePath
7676
77-
$startPattern = "^## \[" + ([regex]::Escape($releaseVersion)) + "\]"
78-
$endPattern = "^## \[{0}\.{1}\.{2}*" -f $semanticVersion.Major, $semanticVersion.Minor, $semanticVersion.Patch
77+
$headingPattern = "^## \[\d+\.\d+\.\d+"
78+
$headingStartLines = $changelog | Select-String -Pattern $headingPattern | Select-Object -ExpandProperty LineNumber
79+
$startLine = $headingStartLines[0]
80+
$endLine = $headingStartLines[1] - 1
7981
80-
$clContent = $changelog | ForEach-Object {
81-
if ($_ -match $startPattern) { $outputLine = $true }
82-
elseif ($_ -match $endPattern) { $outputLine = $false }
83-
if ($outputLine) { $_}
84-
} | Out-String
82+
$clContent = $changelog | Select-Object -Skip ($startLine-1) -First ($endLine - $startLine) | Out-String
8583
8684
Write-Verbose -Verbose "Selected content: `n$clContent"
8785

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp