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 clone and scaffold subsites #5

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

Conversation

amitaibu
Copy link
Member

@amitaibu amitaibu commented Mar 25, 2020

This is another take without the complexity of git-submodules which is shown in #4

Disadvantage here is that git doesn't keep track of which subsites we had and which revision. On the other hand - and its a big one - we don't have to mess with git-submodules.

Instead Robo just git clones the sub-sites and with .gitignore we make sure the base repo doesn't get confused with those new repos.

Another improvement is that the robo is executed from ddev itself, and not the host, thus removing the need for the host to have latest PHP and extensions installed.
By running ddev auth ssh once, we're able to use git with the host credentials. So all that remains is:

ddev exec "cd .. && ./vendor/bin/robo fetch ./robo/sites-collection1.csv" && ddev restart

asciicast

and cleanup:

ddev exec "cd .. && ./vendor/bin/robo reset"

Future Improvements

I can imagine adding in Robo some $this->ask("What is the Git URL?");, so sub-site owners could easily scaffold their new site.

@amitaibu amitaibu changed the title Robo command to clone subsites Robo command to clone and scaffold subsites Mar 25, 2020
README.md Outdated Show resolved Hide resolved
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