callowayproject / bump-my-version

A small command line tool to simplify releasing software by updating all version strings in your source code by the correct increment and optionally commit and tag the changes.
https://callowayproject.github.io/bump-my-version/
MIT License
349 stars 21 forks source link

Support for CalVer #160

Closed cclauss closed 7 months ago

cclauss commented 8 months ago

For some projects (esp. continuous release internal projects) it would be quite useful to use bump-my-version to generate versions in YYYY-0M-0D-0h-0m and other similar calendar-based formats. See https://calver.org

We do CI/CD with multiple releases each day but tools like Sentry can use releases to understand when bugs were first created and when they were resolved. See https://docs.sentry.io/product/releases

We could do this with major.minor.patch but we sense that we would churn through a lot of patch IDs and would constantly be mapping between version numbers and release dates. CalVer is more self-documenting for internal DevOps purposes.

coordt commented 8 months ago

My goal was to support this. Now that you bring it up, I can see some difficulties since the interface calls to bump a specific part.

What kind of interface would you propose to make this easier? The underlying mechanisms will support CalVer already, so it is really just a matter of interface.