Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As it stands, there is no way during drush quickstart-create
to pass the --working-copy
switch to drush make. I would have to re-make the site, somewhat defeating the purpose of using quickstart-create.
Can you enable a way to do this? I want to keep the Git repositories after they're downloaded so I can use git apply on patches.
Comments
Comment #1
wizonesolutionsWhoops, miscategorized. It's either this or Contrib Scripts.
Comment #2
wizonesolutionsThere's a workaround for this for people who are wondering.
Some notes:
/home/quickstart/websites
.The steps:
drush quickstart-create --domain=domain.dev --makefile=yourmakefile.make
(this takes care of the virtual host, DNS, database, and that stuff)mv domain.dev domain.dev.old
drush make --working-copy yourmakefile.make domain.dev
(yes, we are redoing the make - this time it will remain a Git repository though)cp domain.dev.old/sites/default/settings.php domain.dev/sites/default && sudo chown -R quickstart:www-data domain.dev/sites/default && sudo chmod -R 775 domain.dev/sites/default
I have no idea why the last step is necessary; conventional wisdom would say you should run
drush site-install --site-name=domain.dev --db-su=root --db-su-pw=quickstart
. However, that still had me get prompted with the installation screen, despite reporting success. Only going to the site solved this. This was true for Drupal 6, Drupal 7, and Drupal 8. If someone knows where I went wrong, please correct me.Hope this helps and that a more proper fix (allowing to pass through switches to
drush make
) can be implemented.Comment #3
greg.1.anderson CreditAttribution: greg.1.anderson commentedYou might compare with
drush quick-drupal
in drush-5.x. See also #1255708: Use quick-drupal with drush make for the start of support for --make= in quick-drupal, and #1206340: introduce an options array in the root level of the makefile for the start of--working-copy
support in makefiles.Comment #4
BrilliantMkting CreditAttribution: BrilliantMkting commentedI think this would be a Really useful feature to add in a future Quickstart release.
[Edit] I found a way to enable this by default.
1.) Open quickstart/quickstart/drush/quickstart.inc
2.) Scroll down to line 225
3.) Replace it with:
drush_backend_invoke("make --working-copy --prepare-install $makefile $codepath");
and now it should automatically download the working repositories.
Comment #5
greg.1.anderson CreditAttribution: greg.1.anderson commentedDrush-5RC5 is out, and Drush-5 stable is expected at any time. Therefore, you should use
drush_invoke_process('@self', 'make', array($makefile), array('working-copy' => TRUE, 'prepare-install' => TRUE));
instead of drush_backend_invoke. It would probably be better to pull 'working-copy' from some option, e.g.drush_get_option('working-copy', FALSE);
.n.b. Did not look at the code to see what is in $codepath; add contents to options or args as appropriate.
Comment #6
MichaelCole CreditAttribution: MichaelCole commentedThere's work here updating the Quickstart Drush scripts to Drush 5.0. Anyone intersted in contributing?
Thanks!
Mike