sbt-release
sbt-release copied to clipboard
First draft for an automatic README.md version update
Hi,
This PR is a draft for the following feature:
Automatically update the version defined in the
README.md
to the released version
This is implemented via two additional release steps:
-
updateReadme
-
commitReadme
The implementation is yet missing some crucial parts
- [ ] configurable regex to find the version definition
- [ ] configurable README.md file ( necessary ? )
- [ ] documentation
WDYT?
I'm not sure about the implementation (I'm not familiar with sbt-release internals, and the version regex seems to be a bit dangerous: that might also match non-versions or versions of other software also mentioned in the README). Perhaps it should be restricted to specific patterns (e.g. ship with patterns for sbt/maven/gradle dependency examples that match artifact names being released, extensible by users of the plugin?)
Nonetheless this would indeed be a super useful feature!
Thanks a lot for your feedback :)
the version regex seems to be a bit dangerous: that might also match non-versions or versions of other software also mentioned in the README
This is absolutely true. For this reason I want to make it configurable, so every user can tailor it to its needs.
Perhaps it should be restricted to specific patterns (e.g. ship with patterns for sbt/maven/gradle dependency examples that match artifact names being released
Shipping a bunch of commonly used patterns could be a nice addition in another pull request.
any updates?