Closed anthony-launay closed 4 months ago
Hi @anthony-launay,
if you want to create a repository similarly to symfony/recipes
you might take a look at the repository I've created for Sylius (https://github.com/Sylius/SyliusRecipes) :).
Basically, you need two branches (I called them main
and flex/main
). On the main
branch we keep the files like you mentioned (structured with directories), then on push we have configured GitHub Workflows (check the .github
directory) which "translates" the structured form from the main
branch intro the "flat" one on the flex/main
branch.
@jakubtobiasz is right. The GHA scripts we use in symfony/flex are public and reusable, feel free to have a look.
Hello @jakubtobiasz @nicolas-grekas,
The scripts in Recipes Checker are based on Github and do not allow the use of GitLab.
What to do in this case?
Indeed, we don't support Gitlab and we don't need to. So, I suppose you can adapt these scripts.
@anthony-launay
main
branch) are reflected on GitHub, and changes on GitHub (flex/main
branch) are reflected on GitLab
Hello,
I would like to organize my private recipes in subdirectories. However, I have the impression that today it's only possible to organize them in flat files (https://symfony.com/doc/current/setup/flex_private_recipes.html#create-your-private-recipes)
Example :
However, I would like this organization like (symfony/recipes) :
I use GitLab, the API requires encoding
file_path
: https://docs.gitlab.com/ee/api/repository_files.html#get-file-from-repositoryThat's why I specified this configuration for
recipe_template
:https://gitlab.myhost.fr/api/v4/projects/XXX/repository/files/{package}%2F{version}%2Fmanifest.json/raw?ref=main
Everything looks perfect, except that the URL generated by Flex is
https://gitlab.myhost.fr/api/v4/projects/XXX/repository/files/group1/thrid-bundle%2F{version}%2Fmanifest.json/raw?ref=main
group1/thrid-bundle
is not encoded, the API responds with a 404.Do you think, in Download.php, it's possible to offer new parameter mamed
package_encoded
?Thus, we could specify this configuration for
recipe_template
:https://gitlab.myhost.fr/api/v4/projects/XXX/repository/files/{package_encoded}%2F{version}%2Fmanifest.json/raw?ref=main
This would allow flexibility and an interesting evolution for the structuring of private recipes.
If this development is interesting, I would propose a pull request. If there is already a way to do this, I'm interested !