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"