zestsoftware / zest.releaser

Python software releasing made easy and repeatable
https://zestreleaser.readthedocs.io
GNU General Public License v2.0
198 stars 62 forks source link

Use Annotated Tags in Git #285

Closed kojiromike closed 6 years ago

kojiromike commented 6 years ago

According to git's own documentation:

Annotated tags are meant for release while lightweight tags are meant for private or temporary object labels. For this reason, some git commands for naming objects (like git describe) will ignore lightweight tags by default.

mauritsvanrees commented 6 years ago

Sounds useful. Let me see. I don't explicitly use annotated tags, but when I checkout a tag and do git describe, it shows me the tag anyway.

Ah, the same tag documentation says:

If -m or -F is given and -a, -s, and -u are absent, -a is implied.

We are giving a commit message with -m, so our tags are actually annotated already.

But what happens when we explicitly pass -s, like when you have [zest.releaser] tag-signing = yes in setup.cfg? Ah, no problem according to the same page:

Tag objects (created with -a, -s, or -u) are called "annotated" tags; they contain a creation date, the tagger name and e-mail, a tagging message, and an optional GnuPG signature.

This confirms tests that I did just now in a test repo.

Do you agree that the current zest.releaser code is already creating annotated tags, and that we can close your PR? Or am I overlooking something?

kojiromike commented 6 years ago

Yes, you are right. Because you are including -m, the -a is redundant. Thanks for awesome software!