Skip to content

fix(release-notes): trim trailing blank line from assembled RELEASE-NOTES.md#349

Open
shimib wants to merge 1 commit into
llm-d:mainfrom
shimib:fix/release-notes-eof
Open

fix(release-notes): trim trailing blank line from assembled RELEASE-NOTES.md#349
shimib wants to merge 1 commit into
llm-d:mainfrom
shimib:fix/release-notes-eof

Conversation

@shimib

@shimib shimib commented Jul 24, 2026

Copy link
Copy Markdown
Member

What does this PR do?

hack/assemble-release-notes.sh ends each assembled section with a blank separator line. On the first release (nothing after the <!-- BEGIN RELEASES --> marker), that blank lands at EOF, and the end-of-file-fixer pre-commit hook rejects the file — which is exactly what happened while preparing v0.8.0 in #348.

This adds a post-assembly trim so RELEASE-NOTES.md always ends with exactly one newline. Internal blank separators between release sections are preserved (the trim only removes trailing blanks).

Testing

  • Unit-tested the trim on three cases: trailing-blank file (trimmed), multi-section file with an internal blank separator (preserved, no-op), and an already-clean file (no-op).
  • End-to-end sandbox run of the full script on a first-release scenario → output ends with a single trailing newline, no blank line.

Release note

NONE

The assembled section ends with a blank separator; on the first release
(nothing after the marker) that blank lands at EOF, which the
end-of-file-fixer pre-commit hook rejects. Trim trailing blank lines
after assembly so RELEASE-NOTES.md ends with exactly one newline;
internal blank separators between release sections are preserved.

Signed-off-by: Shimi Bandiel <shimib@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants