-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recipe: Sous Admin #2
Conversation
@@ -14,6 +14,7 @@ lando npm --prefix ./web/themes/custom/sous-project install --silent | |||
bash ./scripts/sous/recipe-scaffold.sh | |||
lando drush site:install minimal --account-name=sous-project --account-name=superuser_1 -y | |||
lando install-recipe sous_base | |||
lando install-recipe sous_admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like at this time we can't install any but the sous_base recipe, which already has its dependencies in the main composer file. This is because when you include a package/recipe that has a composer file from its own repository, it imports the dependencies from the composer file. But when we're scaffolding or just copying that package in, the dependencies don't get imported. Right now when I try to install the sous_admin recipe, it throws an error about unmet dependencies because its composer dependencies are not installed. I'm not sure how to fix this atm...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ -f web/recipes/"$recipe_directory_name"/composer.json ]; then
cd web/recipes/"$recipe_directory_name"
composer install --working-dir=./
cd ./
fi
We could add something like the above to install-recipe.sh, but then we need the composer file in the recipes to include the repositories, composer-installers package and the installer-paths sections.
Or we move to separate repos sooner rather than later...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I did it by adding the path in the repositories section:
{
"type": "path",
"url": "web/recipes/sous_admin"
}
Then I required it
"fourkitchens/sous_admin": "*",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works with:
{
"type": "path",
"url": "assets/scaffold/recipes/sous_admin"
}
"fourkitchens/sous_admin": "*",
in composer.json
Using the assets path seems a little sus but we can't run composer if it's pointing to the web path, which doesn't exist until after composer update runs...
Since it's just for now it seems fine to do it this way (?)
364c94e
to
3235c2d
Compare
@callinmullaney I updated lando to use the Drupal10 recipe and needed to update the patch to the 10.2 patch. I also added the path to the repositories section of composer, so now it includes and installs the recipe as part of the normal install process. I think we can merge this! |
Purpose:
Testing: