Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a print subcommand #140

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kurtmckee
Copy link
Contributor

@kurtmckee kurtmckee commented Mar 11, 2025

Note

Tests are failing on Windows due to newline behavior. I'll work to resolve this after hours.

This introduces a print subcommand that can generate a changelog entry from fragments (similar to collect) or extract an existing entry from the changelog by specifying a --version.

To accommodate environments that do not support output redirection (like tox), an --output argument can be used to write directly to a file. Platform-specific newlines are used by default, but if the changelog is read then its newlines are respected when writing the new file.

Tests and documentation are added, and make botedits was run. Note that it was necessary to modify the CLI runner, which was incorrectly mixing STDOUT and STDERR streams and was adding additional newlines to the output.

I'll monitor CI to confirm whether the test suite passes (or fails, if it's caused by these changes).

Closes #115

@kurtmckee kurtmckee force-pushed the print-command-issue-115 branch from c657d66 to 666589c Compare March 11, 2025 14:36
@kurtmckee kurtmckee force-pushed the print-command-issue-115 branch from 666589c to d94d3b3 Compare March 11, 2025 14:51
@kurtmckee kurtmckee marked this pull request as draft March 11, 2025 14:54
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.

Allow collect to print to stdout
1 participant