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

Allow for date replacement when running release-please #1798

Open
aaronware opened this issue Jan 5, 2023 · 2 comments · May be fixed by #2440
Open

Allow for date replacement when running release-please #1798

aaronware opened this issue Jan 5, 2023 · 2 comments · May be fixed by #2440
Assignees
Labels
help wanted We'd love to have community involvement on this issue. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@aaronware
Copy link

When releasing a version my team finds it useful to provide the date of release within our readme.md files (and extra-files as well).

It would be great to provide the date within replacements for use within files (being updated) in addition to also doing the other version bumps.

Additional information
Example: Our README.md has the following

<!-- x-release-please-lastest-version -->
### Latest Release [1.2.3] 09-02-2022
<!-- x-replease-please-end -->

It would be great to bump that date to the date of the latest merge within this action instead of doing another action for this step.

@aaronware aaronware added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jan 5, 2023
@aaronware
Copy link
Author

aaronware commented Jan 5, 2023

This is an older task from the github action that was requested to be moved to the parent project.

See https://github.com/google-github-actions/release-please-action/issues/602

@chingor13 chingor13 added the help wanted We'd love to have community involvement on this issue. label Jan 19, 2023
@chingor13
Copy link
Contributor

I could see this being added to https://github.com/googleapis/release-please/blob/main/src/updaters/generic.ts (which is used by the extra-files config.

jolars added a commit to jolars/release-please that referenced this issue Nov 20, 2024
Allow updating of dates using the generic updater, by adding a
x-release-please-date or x-release-please-version-date (to update both
version and date) to a file anywhere.

The implementation is still very basic. The date is retrieved by just
checking the current date, but a better approach would be to look at the
timestamp of the previous feat/fix or breaking change for a conventional
commit, I think.

I've added an option --date-format to specify the date format. There are
no assertions with respect to this right now, and the regex matching can
be improved in several ways.

One option I considered was to try to auto-detect the date format, but I
think this is bound to be problematic because there are ambiguities in
date formatting.

Fixes googleapis#1798
@jolars jolars linked a pull request Nov 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We'd love to have community involvement on this issue. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants