feat: tag recipes with abra #99
Merged
decentral1se
merged 5 commits from 2021-09-29 12:39:36 +00:00
knoflook/abra:recipe-release into main
Labels
Clear labels
bug
build
ci/cd
critical fix
design
documentation
duplicate
easy-first-issue
enhancement
help wanted
i10n
i18n
installer
invalid
question
release
release-candidate
security
tech-debt
test
wontfix
Something is not working
go build related issues
Building things with CI/CD
https://docs.coopcloud.tech/federation/resolutions/passed/010/
UI/UX
Documenting all the things
This issue or pull request already exists
Something for new people to get stuck into. We hope it's easy!
New feature
Need some help
Everything to do with localisation
Everything to do with internationalisation
Everything to do with the install script.
Something is wrong
More information is needed
Release management
Related to the new release candidate
Security related
Unit/integration testing
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/abra#99
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This will close coop-cloud/organising#135
what do we have so far:
--major,--minorand--patchas flags for generating the new tagthat's it. There is some code to get the last tag object from the repo but honestly the git library is difficult for me to grasp. Now to be able to compute a new version we need to:
I hope I'll do this by the end of this week but no promises. The git library is sparsely documented, and uses weird stuff like iterators and own types to deal with simple problems like listing tags.
Great stuff. I tried running
./abra recipe release keycloakand it didn't work though?@@ -0,0 +35,4 @@Action: func(c *cli.Context) error {recipe := internal.ValidateRecipe(c)directory := path.Join(config.APPS_DIR, recipe.Name)This block is all done in
internal.ValidateRecipe(c)already.@@ -0,0 +45,4 @@tag := c.Args().Get(1)if tag == "" {for name, version := range images {if !isSemver(version) {The thing is, most versions are not strictly semver so we'd only be able to cover a tiny amount of the recipes we have. But we've already got
tagcmpwhich can handle discovering what is a patch/minor/major upgrade and these formats are supported. So then we just need to check if itIsParsable?@@ -0,0 +66,4 @@if err != nil {logrus.Fatal(err)}// TODO: This is some magic and I have no idea what's going on but it does the job. Re-write if this looks stupid to you. Copied from the docs /knoflook(from
recipe.EnsureVersion)moved to tagcmp. I feel like this code is a big hack but it works 🤷
I talked to @3wordchant and they said this is already useful so I guess we can merge these changes @decentral1se? Next step would be to add commits and then automatic tag computation but this will be a bit of a challenge and might take some more time. Also I'm not sure how to go about having multiple images changing versions in one commit. I guess it would make the most sense to just use the most important version change i.e.
nextcloud 21.0.3 -> 21.0.4
mariadb 10.5 -> 10.6
1.2.3+21.0.3 -> 1.3.0+21.0.4