feat: tag recipes with abra #99
No reviewers
Labels
No Label
bug
build
ci/cd
contributing
design
documentation
duplicate
enhancement
help wanted
invalid
meta
question
security
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/abra#99
Loading…
Reference in New Issue
No description provided.
Delete Branch "knoflook/abra:recipe-release"
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?
This will close coop-cloud/organising#135
what do we have so far:
--major
,--minor
and--patch
as 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 keycloak
and 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
tagcmp
which 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
WIP: feat: tag recipes with abrato feat: tag recipes with abra