April 2014

Incoming

Hank the cow dog cover As is apt to happen, being a parent, I was recently listening to a bit of a Hank the Cowdog story in which the canine protagonist is describing being in the heart of a thunderstorm. In typical hyperbolic fashion he likens it to being bombarded by eighty-eight artillery.

This seems oh so very appropriate for a Monday morning as it describes well the feeling of wanting to yell incoming while tip-toeing through one's email box.

Drush sql-sync with a remote mac

Owing to this issue if one tries to do a drush sql-sync on a system where the remote machine is BSD-Unix based, such as Mac OSX, the command fails with a stat: illegal option -- - warning. The Drush 7.x branch has completely rewritten this functionality and may not suffer from the same issues. So after much poking at ways of fixing it the simplest, by far, is to use the --no-cache option.

The easiest option to ensure this is done is to add the command specific command to your alias definition for any sites where the remote site is a mac (or the local if you're going to sync form the local up to some other system).

  'command-specific' => array (
    'sql-sync' => array (
      'no-cache' => TRUE,
    ),
  ),

Drush and cloning

I need to pull down a site I have on my other computer but haven't setup here for local development. I keep thinking there should be a 'drush clone' command... well there is but it clones modules not the way I'm thinking of. Basically the command I have in mind would:

  1. Clone the git repository of the site into the proper local directory.
  2. Copy the files from the production or developer site.
  3. Create the local database and sync from production or developer instance.
  4. Or instead of syncing the database do a site install if that's called for.

This requires of course that drush aliases already exist for the site. How to handle this and keep everybody in sync. Well, here's my stab at a highly configurable, very customizable drush configuration for people who work with one or more teams.