go-semantic-release icon indicating copy to clipboard operation
go-semantic-release copied to clipboard

Running the changelog command only generates log for the current release and overwrites the file

Open maulik13 opened this issue 4 years ago • 3 comments

I have been testing the changelog function and I see that it only generates changelog for the current release. Also, with the default output it overwrites the current CHANGELOG.md file, losing the old change logs. And hence I am not able to use the changelog feature from the tool. At the moment I have to rely on another tool for changelog generation.

Here is what I have seen other projects do, which will be very helpful to use the changelog feature.

  • It should be able to generate the entire changelog (or based on tag ranges)
  • It should have a possibility to prepend the change log from the current release to the existing CHANGELOG.md file

maulik13 avatar Jan 25 '21 19:01 maulik13

@Nightapes this could be a new subcommand. What do you think?

e.g.

go-semantic-release changelog --tag-range v1.0.0 v2.0.0

fwiedmann avatar Jan 26 '21 09:01 fwiedmann

nvm. there is already the command.

But we could improve it with your suggestions @maulik13.

fwiedmann avatar Jan 26 '21 11:01 fwiedmann

That sounds good to me. Just for the reference, I am using git-chglog at the moment and it has a feature for tag queries.

Tag query in git-chglog

When using the version itself in the query either a prefix can be ignored or always use the non prefixed version. The prefix can also be picked up from the configuration.

As for the workflow, I am not sure how others use it. But I want to be able to prepend the current release changelog to the previously generated changelog. And a capability to regenerate an entire (or partial) changelog in case it is required.

While I can prepend the log using shell commands in my current CI/CD flow, it would be easier if the tool itself can do the prepend operation.

Thanks for your quick replies :)

maulik13 avatar Jan 26 '21 12:01 maulik13