tokuhirom / Minilla

Authorizing tool for CPAN modules
https://metacpan.org/release/Minilla
Other
97 stars 65 forks source link

Request: custom date/time format in the Changes file #261

Open cxw42 opened 5 years ago

cxw42 commented 5 years ago

Here, the Changes file is always updated with a fixed strftime format:

$project->work_dir->changes_time->strftime('%Y-%m-%dT%H:%M:%SZ')
                                            ^^^^^^^^^^^^^^^^^^

Would you be willing to add a minil.toml configuration option so that we could change that format? I would like to use date without time. Thank you for considering this request!

tokuhirom commented 5 years ago

patches welcome

cxw42 commented 5 years ago

@tokuhirom While adding the tests, I found this line - Minilla::WorkDir::build() calls Minilla::WorkDir::_rewrite_changes() instead of using Minilla::Release::RewriteChanges::run(). Why do both call strftime? Should I just make the change both places, or can they be refactored to use common code? Thanks!

cxw42 commented 5 years ago

OK - I see now. Minilla::Release::RewriteChanges::run() modifies the Changes file in the repository. Minilla::WorkDir::_rewrite_changes() modifies the Changes file in the distribution (the work directory; what will be uploaded to CPAN).