Skip to content
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

Robo command to fetch git-submodules #4

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft

Conversation

amitaibu
Copy link
Member

@amitaibu amitaibu commented Mar 24, 2020

I've continued to experiment with DDEV multi-sites and git submodules. 
My use case is that each subsite has its own repo, and the "base repo" should be able to plug & play different subsites.

Getting git-submoduels right can be hard and error prone (but IMO makes sense to use in this specific scenario). so I've added a Robo file that knows how to:

  1. Cleanup previous submodules.
  2. Add the new ones, based on a CSV file that has the subsite name, git repo, and git branch
  3. Add symlinks for new subsites, for their config, so config split will work.
  4. Copy an adapted settings.php to each subsite1. Re-create config.local.yaml so ddev will install those new sites
  5. Run ddev restart

Complimenting this ./vendor/bin/robo fetch "./robo/sites-collection1.csv" command there's a ./vendor/bin/robo reset", to cleanup the directory and git.

asciicast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant