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

Include date of stop revision in generated output #46

Open
lagru opened this issue Oct 3, 2023 · 3 comments
Open

Include date of stop revision in generated output #46

lagru opened this issue Oct 3, 2023 · 3 comments
Labels
type: Enhancement New feature or request

Comments

@lagru
Copy link
Member

lagru commented Oct 3, 2023

As recommended in https://keepachangelog.com/en/1.0.0/, release notes or changelogs should contain a date in some form. It's easy enough to include if we settle on what should be the truth. I tend to think it should be the timestamp of the last given revision (stop_rev). This should lead to a correct release date for most cases.

@lagru lagru added the type: Enhancement New feature or request label Oct 3, 2023
@jarrodmillman
Copy link
Member

I would think the date should be the release date (i.e., the date the tag was made). That could be difficult to get right since the changelist is run before tag is made.

Maybe changelist could be extended to handle making the tag as well. If we do that, then it could insert the date at the same. So replace

- Commit changes:

      git add pyproject.toml CHANGELOG.md
      git commit -m "Designate ${VERSION} release"

- Tag the release in git:

      git tag -s v${VERSION} -m "signed ${VERSION} tag"

  If you do not have a gpg key, use -u instead; it is important for
  Debian packaging that the tags are annotated

with

- Commit and tag changes:

      git add pyproject.toml ${CHANGELOG}
      changelist tag ${VERSION} ${CHANGELOG}

where

      changelist tag ${VERSION} ${CHANGELOG}

does something like

      git commit -m "Designate ${VERSION} release"
      # replace a comment in the ${CHANGELOG} with the current date
      git tag -s v${VERSION} -m "signed ${VERSION} tag"

@lagru
Copy link
Member Author

lagru commented Oct 6, 2023

Hmm, the date / tag thing is indeed more tricky than I thought.

I don't think we should expand the scope to creating tags. Right now I like that changelist works entirely on the remote repository with read-access only. Tagging would require to break with that. How about the following solution instead?

  • Default to the date of stop_rev.
  • Optional --date DATE option (just like --version) that overrides the date of stop_rev.

@jarrodmillman
Copy link
Member

jarrodmillman commented Oct 6, 2023

It is hard to predict when you will make a release. So I don't think there is much need for a --date flag. I can just add a note to the release process for projects I am using this for reminding me to manually fix the date when I make the release tag.

Maybe a better solution would be to add a --date flag that would use the date of stop_rev to add a date to the release notes. And if you don't use the flag, then you don't get any date inserted. That would certainly make things easier for me as I could just not include the date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants