Skip to content

Conversation

@umarcor
Copy link
Member

@umarcor umarcor commented Mar 11, 2023

This is a subset of #885, introducing minimal modifications to start using towncrier.

Instead of generating all of docs/release_notes.rst, a skeleton is checked in git. The skeleton includes two files:

  • news.inc: generated by towncrier.
  • release_notes.inc: generated by the existing logic in create_release_notes.py.

towncrier is executed in create_release_notes. Hence, in the same function all the news fragments are combined into news.inc and all the release notes are combined into release_notes.inc. This works even if no news fragments exist (right after a release) because towncrier will produce a sentence telling that no relevant news exist yet.

When a release needs to be done, a maintainer renames the news.inc to release_notes/X.Y.Z.rst and removes the news fragments before executing release.py.

It is to be noted that towncrier tries to add the generated file to git. It seems not possible to prevent it through the configuration nor the CLI. The only alternative seems to be --draft, which prints to stdout instead of writing to the file. That's why this PR uses a fixed file name for towncrier and it is added to .gitignore. The output of towncrier is always temporary (e.g. generated in CI) until a maintainer renames the file to be treated as release notes.

/cc @GlenNicholls

@umarcor umarcor force-pushed the umarcor/towncrier branch 2 times, most recently from 2063996 to 7e39157 Compare March 11, 2023 06:04
@umarcor
Copy link
Member Author

umarcor commented Mar 11, 2023

FTR twisted/towncrier#487

@umarcor umarcor force-pushed the umarcor/towncrier branch from 7e39157 to cabe6dc Compare April 20, 2023 00:16
@eine eine merged commit 358979f into VUnit:master Apr 20, 2023
@umarcor umarcor deleted the umarcor/towncrier branch April 20, 2023 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants