diff --git a/.gitea/workflows/forge-announce.yml b/.gitea/workflows/forge-announce.yml index af87077..10e82ea 100644 --- a/.gitea/workflows/forge-announce.yml +++ b/.gitea/workflows/forge-announce.yml @@ -101,16 +101,16 @@ jobs: if ($idx -lt 0) { throw "V5: changelog-Block nicht gefunden in $yamlPath" } $afterMarker = $raw.Substring($idx + $marker.Length) $changelogBody = (($afterMarker -split "`r?`n") | ForEach-Object { - if ($_ -match '^ ') { $_.Substring(2) } else { $_ } + if ($_ -match '^ ') { $_.Substring(4) } else { $_ } }) -join "`n" - $header = "**Hellion Chat $version" + $header = "**v$version " $start = $changelogBody.IndexOf($header) if ($start -lt 0) { throw "V5: No changelog entry for version $version found in $yamlPath. Update the changelog block before tagging." } $rest = $changelogBody.Substring($start) - $nextHdr = $rest.IndexOf("`n`n**Hellion Chat ", 1) + $nextHdr = $rest.IndexOf("`n`n**v", 1) $trailer = $rest.IndexOf("`n`n---") if ($nextHdr -ge 0 -and ($trailer -lt 0 -or $nextHdr -lt $trailer)) { $enBlock = $rest.Substring(0, $nextHdr).TrimEnd() diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index ea91226..4615366 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -111,20 +111,22 @@ jobs: # changelog: is the last top-level key in the manifest, so # everything after the marker is the literal block. Strip the - # 2-space yaml indent from each line. + # 4-space yaml indent (prettier convention) from each line. $afterMarker = $raw.Substring($idx + $marker.Length) $changelogBody = (($afterMarker -split "`r?`n") | ForEach-Object { - if ($_ -match '^ ') { $_.Substring(2) } else { $_ } + if ($_ -match '^ ') { $_.Substring(4) } else { $_ } }) -join "`n" - $header = "**Hellion Chat $version" + # Subblock convention: "**vX.Y.Z — ()**" + # matches verify-changelog-sync.sh and slim-rule grep. + $header = "**v$version " $start = $changelogBody.IndexOf($header) if ($start -lt 0) { throw "No changelog entry for version $version found in $yamlPath. Update the changelog block before tagging a release." } $rest = $changelogBody.Substring($start) - $nextHdr = $rest.IndexOf("`n`n**Hellion Chat ", 1) + $nextHdr = $rest.IndexOf("`n`n**v", 1) $trailer = $rest.IndexOf("`n`n---") if ($nextHdr -ge 0 -and ($trailer -lt 0 -or $nextHdr -lt $trailer)) {