cookpete / auto-changelog

Command line tool for generating a changelog from git tags and commit history
MIT License
1.26k stars 157 forks source link

Print only most recent version with --package? #288

Open laduke opened 5 months ago

laduke commented 5 months ago

If I have 0.2.22 in my package-json, but the v0.2.22 tag doesn't exist yet:

npx auto-changelog --package --stdout --starting-version=v0.2.21  

prints the log for .21 and .22. I want only .22

if you put -p --starting-version=v0.2.22: it throws

TypeError: Invalid version. Must be a string. Got type "undefined".

I worked around with with some sed, but it's a pain to get the quoting right.

auto-changlog ... | sed -n "/\[v0.2.21\]/q;p"