Skip to content

Regenerating changelog after taging changes the date #796

@alerque

Description

@alerque

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

I've been using git cliff -t vX.Y.Z as part of a build system as a way to lint the release and make sure everything got generated properly. This works fine the day-of, but fails if run later. The generated changelog always has the current date even if the tag and release already exists.

I understand there is a cart-before-the-horse issue at play here, but it seems like if a tag exists, the release date should be derived from the tag rather than the current time. Notably this is only a problem for the current release, it does not affect the backlog of generated releases all the rest of which are untouched.

Steps To Reproduce

Rebuild a changelog while on a tagged release on a day later than the changelog was originally generated.

Expected behavior

Release date to be derived from the tag if extant, current date if not.

Screenshots / Logs

No response

Software information

git-cliff 2.4.0

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions