Annotated vs lightweight tags confuse go-git #185
Labels
No Label
abra
abra-gandi
awaiting-feedback
backups
bug
build
ci/cd
community organising
contributing
coopcloud.tech
democracy
design
documentation
duplicate
enhancement
finance
funding
good first issue
help wanted
installer
kadabra
performance
proposal
question
recipes.coopcloud.tech
security
test
wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/organising#185
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
go-git uses different incompatible functions with different types of returned objects to list annotated and unannotated tags (to make programming more fun and challenging I suppose). We have to decide on which tags we'll be using for our apps. I think we can go with annotated tags as we can put release notes in the tag metadata and also they automatically include info like the name of the person that created the tag (which would be useful if we want to bully them for making a mistake). If you use the wrong type of tag and then try to use
abra recipe release -x/y/z appname
it's gonna do this:a third option would be to write our own function to collect both annotated and lightweight tags and then present them as an array of
plumbing.Tag
objects but this is additional workhttps://pkg.go.dev/github.com/go-git/go-git/v5#Repository.Tags
https://pkg.go.dev/github.com/go-git/go-git/v5#Repository.TagObjects
No bullying in Co-op Cloud ✋
So, to reproduce, one should
git tag -a
and write some stuff thenabra recipe release ...
and it explodes or?I guess my first take is to bring as much as possible out of Git because it is Git. We can do release notes in a text file instead and can track other meta from the log if really necessary.
Can we write a function to convert annotated tags to the ones we expect?
I may not be understanding the issue correctly ofc 😆
oh no 😢
yeah that's what happening to me
me neither, i think i might have to come back to it tomorrow with a clear mind 😆
Thanks for laying this out so clearly @knoflook. I agree with your leaning towards annotated tags, I've used non-annotated tags exactly zero times in my life, why start now 🙃
I can imagine (and am happy to write) a tortured script to change it over after if we decide that unannotated was in fact the move.
Shall we just mandate annotated tags for now and document that that is what must be used?
i think that's gonna be for the best.
Also I'm working on a change in tagcmp to properly parse tags with "+", we'll see how it's gonna work out
If someone can send a docs patch to https://docs.coopcloud.tech/recipe-maintainer-guide/ stating that we need to use annotated tags then we can close this off for now 🚀
Threw down something in
8cbc3dbc02
about how I'm doing it now (usinggit tag
manually due to #187). Feel free to update as we go along with all this :)