Fancy writing a Dist::Zilla plugin?
Does anyone fancy writing a Dist::Zilla plugin that would read a Changes file in YAML and munge it to one in the CPAN::Changes::Spec format?
As part of my quest to get another 1% of CPAN conforming to CPAN::Changes::Spec, I yesterday submitted a pull request for Mo's Changes file.
INGY pointed out that it's currently in a YAML format (something I hadn't realised!), and suggested a Dist::Zilla plugin could be written that converts his YAML format to the CPAN::Changes::Spec format, which is what would be shipped to CPAN.
Seems like this wouldn't take very long for someone familiar with DZ plugins. Anyone fancy it? Write a quest on Questhub, and I'll +1 you for sure!
Hi Neil,
Good to see that you are still pushing through on the quest!
I use the following module to get a Changes file from git commits: Dist::Zilla::Plugin::ChangelogFromGit::CPAN::Changes
There used to be a issue for distributions that were not following Changes::Spec versioning standard in their release tags(like my own that tagged their releases like release-1.23 etc.) but that was fixed as per this patch that I pushed to the repo:
https://github.com/ioanrogers/Dist-Zilla-Plugin-ChangelogFromGit-CPAN-Changes/pull/6
essentially you can use specify regex to parse the release tag and get a version number compliant with Changes::Spec. I am happy to report that with my dzil bundle reconfigured, I am at full spec compliance now :)
HTH,
-Shantanu Bhadoria
Something like this, Neil? https://github.com/sharyanto/releases-perl-cpan/blob/master/published/2013/Dist-Zilla-Plugin-ConvertYAMLChanges-0.01.tar.gz
Should be on CPAN soon.
Tested on Mo, seems to work, output: https://gist.github.com/sharyanto/7169462
Tried this on IO-All, there's a typo at 0.35. After typo is fixed, Changes conversion works but (but 'dzil build' still fails with some other error).
Didn't try this on File-Share, Changes seems simple enough so it'll probably work. :)
Tried on RosettaCode, works (but 'dzil build' also failed here).
Checked a few other INGY's dists, they don't seem to have dist.ini yet.
Good luck on continuing the quest :)
Quick work Steven! Have a look at Carlos Lima's module: https://github.com/carloslima/dist-zilla-plugin-changesfromyaml/
Maybe you two could merge efforts and produce a single plugin?
Shantanu,
Excellent - good man!