-
Notifications
You must be signed in to change notification settings - Fork 134
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
Support dates in replace #133
Comments
In Python projects, the support of date (current date with datetime.date.today or user-defined date) would be interesting and in harmony with the package metadata which pydoc (and the help function) can display. For instance, if your package contains: __version__ = "0.11.0"
__date__ = "2020-06-10"
__author__ = "Mr Robot <[email protected]>"
__credits__ = "(c) F. Society" The help function would display:
That way, a developper can easily have the version number and the date of your package. So, it wold be great if bump2version could update the version number and the release date at the same time). Question: does bump2verion support pre-/post-release hook ? |
I want to add that I would also like this feature, in particular to update non-Python files. Specifically, manpages. For example, I would like have this in my
It should match this line in my
In the mean time, I have to manually update the date in my manpages. Obviously that's not difficult, but it is a step I tend to forget when I releasing a new version of my code. |
What do people use to achieve this without bump2version? Just an ad-hoc solution, or is there a packaged alternative? |
I do it manually in a commit right before running |
Dates are useful to maintain a Changelog in Keep A Changelog format. With my particular approach I generate a version like |
I just found that this is supported via regex searches in #268 |
I appreciate being told about bump-my-version, but I fail to see how it solves this issue, at least at the moment. The problem is being able to get the current date as a replacement, not the use of regular expressions. |
This functionality requires one or two pieces, depending on what you want to do. If you want to change a date from one date to the current date, e.g. updating citation metadata with a release date, you need (1) find the line with the old date (which, in the original post of this thread, you demonstrated with a regex); (2) replace with the current date.
|
In order to set the current date in the last release notes entry, where we use a ? in unknown digits of the release date, I would like to use something like:
Would it be possible to add
now
support toreplace
, or support this scenario some other way?The text was updated successfully, but these errors were encountered: