intuit / auto

Generate releases based on semantic version labels on pull requests.
https://intuit.github.io/auto/
MIT License
2.28k stars 205 forks source link

Missing version in CHANGELOG.md: Calculating the next version fails if tag contains a name/prefix #2435

Closed restfulhead closed 9 months ago

restfulhead commented 9 months ago

Describe the bug

I'm using auto in a mono repository and my tags contain the name of each sub-package, e.g. my-sub-package-v1.0.0. When generating the changelog, I pass in the previous tag as follows:

npx auto changelog --from my-sub-package-v1.0.0

This works, but causes the version number in CHANGELOG.md to be missing. (The headline that usually renders as <version> (<date>) only displays the current date.)

To Reproduce

Expected behavior The headline in the Changelog should contain the next version number.

Additional context

calcNextVersion in Release should pass only the number to inc, not the entire tag name. I'm going to submit a pull request in a moment.