From 667882995aa5dc594784ea49a00d1e2a0f5d4bc0 Mon Sep 17 00:00:00 2001 From: Andy Date: Sat, 6 Jun 2026 12:17:32 -0400 Subject: [PATCH] fix(release): write pyproject.toml with LF newlines bump.py wrote via Python text mode, which translated newlines to CRLF on Windows and produced a 'CRLF will be replaced by LF' warning on every release. Write with newline='' so the file stays LF, matching .gitattributes. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/bump.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/bump.py b/scripts/bump.py index b9d049b..a552f05 100644 --- a/scripts/bump.py +++ b/scripts/bump.py @@ -62,7 +62,10 @@ def main(argv: list[str] | None = None) -> int: print("Dry run - pyproject.toml not modified.") return 0 - repo.PYPROJECT.write_text(set_version(repo.PYPROJECT.read_text("utf-8"), str(new_version))) + updated = set_version(repo.PYPROJECT.read_text("utf-8"), str(new_version)) + # newline="" writes the string's "\n"s verbatim (LF), instead of translating to the + # platform default (CRLF on Windows) — keeps pyproject.toml LF, matching .gitattributes. + repo.PYPROJECT.write_text(updated, encoding="utf-8", newline="") print(f"Updated {repo.PYPROJECT.name} to version {new_version}.") print( f"Next: draft release notes (/release-notes), review CHANGELOG.md, then\n"