Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cxw42 opened this issue Apr 26, 2019 · 3 comments
Open

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

cxw42 opened this issue Apr 26, 2019 · 3 comments

Comments

@cxw42
Copy link
Contributor

cxw42 commented Apr 26, 2019

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
Copy link
Owner

patches welcome

@cxw42
Copy link
Contributor Author

cxw42 commented May 8, 2019

@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 pushed a commit to cxw42/Minilla that referenced this issue May 8, 2019
New key release.changes_datetime_format is a strftime(3) format to
use when filling in the `{{$NEXT}}` marker.

Fixes tokuhirom#261.
@cxw42
Copy link
Contributor Author

cxw42 commented May 14, 2019

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants