Home > other >  Is there an automatic way to build the "Changes" file from `git log` when publishing a per
Is there an automatic way to build the "Changes" file from `git log` when publishing a per

Time:07-30

I already have my history and version tags in git so it would be nice to sync ./Changes with git log just before publishing the module update.

How would you do that?

CodePudding user response:

There are plenty of programs that will generate a changelog file from a Git commit history (just search on Github for things like "gitlog2changelog"). I've even used them in the past.

But it's a terrible idea.

Your documentation will already contain a link to your Git repo. So anyone who wants it will be able to get access to your commit history. But, depending on your commit and merge strategies, that's likely to contain far too much information to be useful to most people.

A changelog (in my opinion, at least) should be a higher-level summary of the changes in your project. You should be reading the commit history and using that to create a useful summary of the changes.

See Keep a ChangeLog for more details about what a ChangeLog should look like.

CodePudding user response:

I take a bit of a different approach an automatically ģenerate a Release file that is signed by my gpg key as part of the release on cpan.

if you use Dist::Zilla as part of your release process it could be added into dist.ini. It is available at https://metacpan.org/pod/Dist::Zilla::Plugin::SignReleaseNotes

I use it to publish a release note on github.com for my modules that has the checksum of the cpan release file and the git commits since the last release all in a signed message. See https://github.com/perl-net-saml2/perl-Net-SAML2/releases for an example.

I still maintain a separate Changes file. If this helps great if not the code in there will show you how to get the online commits between the latest tag an the previous.

  • Related