Posted by wizonesolutions on September 4, 2011 at 7:18pm
4 followers
Jump to:
| Project: | Drupal Quickstart: Pre-made Development Environment |
| Component: | Drush |
| Category: | feature request |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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
#1
Whoops, miscategorized. It's either this or Contrib Scripts.
#2
There'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.olddrush 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/defaultI 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.#3
You might compare with
drush quick-drupalin 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-copysupport in makefiles.#4
I 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.
#5
Drush-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.