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 support for $NEXT_RELEASE$ source code placeholder / keyword substitution #579

Open
adiroiban opened this issue Mar 17, 2024 · 0 comments

Comments

@adiroiban
Copy link
Member

This is designed as the next step after removing incremental.

Incremental has a nice feature that allowes to replace the NEXT placeholder in the source code, with the value of the current release number.

This is similar to keywords substitution from CVS
but the use case is a different.


The use case is something like this:

During development you add various features in various branches.
When you first implement a change or when you send to review, you don't know the exact version number in which that feature is released.

Any text reference to the version number is replaced at development time with the $NEXT_VERSION$

The branch and merged with source code including the $NEXT_VERSION$ text.

At release time, you run towncrier and towncrier will replace the source code with the actual release number.


I think that it makes sense to have this functionality in towncrier

When you run towncrier, it will delele the release notes fragments ... so it is already modifying the source code.

Also, when you run towncrier it knows the current release version.

The placeholder can also be $NEXT_RELEASE$ or $NEXT_TOWNCRIER_RELEASE$ or something else.
The important part is to make sure it will not overlap with other texts in the source code.

This should be a very simple text replacement.
In this way, you can use the value in Python, RST, JavaScript or any other text file.

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

No branches or pull requests

1 participant