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

wizonesolutions’s picture

Component: Image Build » Drush

Whoops, miscategorized. It's either this or Contrib Scripts.

wizonesolutions’s picture

There's a workaround for this for people who are wondering.

Some notes:

  • domain.dev should be replaced with the local domain name you want.
  • yourmakefile.make should be replaced with the path to your actual Drush Make makefile.
  • The working directory from which you issue commands is assumed to be /home/quickstart/websites.

The steps:

  1. drush quickstart-create --domain=domain.dev --makefile=yourmakefile.make (this takes care of the virtual host, DNS, database, and that stuff)
  2. mv domain.dev domain.dev.old
  3. drush make --working-copy yourmakefile.make domain.dev (yes, we are redoing the make - this time it will remain a Git repository though)
  4. 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
  5. Open Firefox or Chromium and browse to the domain. You'll be presented with the installation page. Start the installation, and you should be told Drupal is already installed. At this point, you can navigate to your site.
  6. 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.

greg.1.anderson’s picture

You 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.

BrilliantMkting’s picture

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.

greg.1.anderson’s picture

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.

MichaelCole’s picture

Status: Active » Closed (fixed)

There's work here updating the Quickstart Drush scripts to Drush 5.0. Anyone intersted in contributing?

Thanks!

Mike