sv4git icon indicating copy to clipboard operation
sv4git copied to clipboard

feat: add --previous option for release-notes

Open vpavlin opened this issue 1 year ago • 0 comments

When trying to generate release notes for RC releases, I could not find a way how to configure sv4git to actually generate release notes from the latest release (e.g. v0.17.0) rather than latest RC (v0.18.0-rc.0) when trying to bump the RC (e.g. to v0.18.0-rc.1).

To fix this I am introducing a --previous option for release-notes command which overrides previousTag variable in getTagVersionInfo

This allows me to explicitly select the start (new RC tag) and end (latest release) tags to generate the release notes. E.g.

$ git tag -l --sort -creatordate
v0.18.0-rc.1
v0.18.0-rc.0
v0.17.0
v0.16.0
$ git-sv release-notes -t v0.18.0-rc.1 --previous $(git tag -l --sort -creatordate | grep -e "^v[0-9]*\.[0-9]*\.[0-9]*$")
...

i.e. generate release notes for v0.18.0-rc.1, but instead of using previous latest tag (v0.18.0-rc.0), use latest tag matching the regex (i.e. v0.17.0) for my case

vpavlin avatar Jun 07 '23 15:06 vpavlin