Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate changelog for a semantically released package

Here is the package I'm working on currently.

This is the first time I'm trying to enforce the conventional changelog format and use semantic release versioning. The releasing itself works fine, I'm having travis CI testing, building and publishing the package to npm, creating a new version and a git tag. There is also a GitHub package release created, which is, in a way, a replacement for a separate changelog file.

What I'm trying to achieve next is to automatically generate the ChangeLog based on the latest release changes. From what I understand conventional-changelog can help with that, but whenever I run:

$ conventional-changelog -p eslint-plugin-protractor -i CHANGELOG.md -w -r 0

I'm getting all the changes grouped under the 0.0.0-semantically-released version, which is the stub version I put into the package.json to avoid warnings during npm install.

What am I doing wrong and how can I generate logs for every semantic release version?

like image 479
alecxe Avatar asked Oct 19 '22 16:10

alecxe


2 Answers

It is working fine for me when I run the following command in your project folder:

conventional-changelog -p eslint-plugin-protractor -i CHANGELOG.md -s -r 0

I have added the contents of the generated CHANGELOG.md to a gist.

Maybe there was a bug with conventional-changelog when you opened this issue?

like image 172
code Avatar answered Oct 31 '22 13:10

code


I think there is a semantic release plugin that does this, https://github.com/semantic-release/changelog, you'll need to add it to the release config in the publish step, or in the plugins array.

like image 38
OAuthMan Avatar answered Oct 31 '22 13:10

OAuthMan