Playing with Drush Make

Drush and Drush Make belong in every Drupal developer's toolkit. This is a make file that will build the following:

  1. Drupal 6.14 (or latest)
  2. ApacheSolr module
  3. SolrPhpClient hosted on code.google.com
  4. Acquia Connector module (from Drupal.org)
  5. Acquia Search module (from Acquia's svn repository)

This demonstrates four different methods for downloading code, from three different sources.

To execute, install Drush, install Drush Make, then run the attached file like this:

drush make search.make

To specify an output directory, add the path as an extra parameter:

drush make search.make /var/log/www

To see what's going on, use the -v flag for verbose output:

drush -v make search.make

Here's the content of the make file:


core = "6.x" 

projects[] = "drupal" 

projects[] = "acquia_connector"

projects[apachesolr][download][type] = "cvs"
projects[apachesolr][download][module] = "contributions/modules/apachesolr"
projects[apachesolr][download][revision] = "DRUPAL-6--2"

projects[acquia_search][type] = "module"
projects[acquia_search][download][type] = "svn"
projects[acquia_search][download][url] = "https://svn.acquia.com/drupal/branches/1.x-6.x/modules/acquia/acquia_search/"

libraries[SolrPhpClient][download][type] = "get"
libraries[SolrPhpClient][download][url] = "http://solr-php-client.googlecode.com/files/SolrPhpClient.r22.2009-11-09.tgz"
libraries[SolrPhpClient][destination] = "modules/apachesolr"

AttachmentSize
search.make692 bytes

Comments

Out of curiosity, how

Out of curiosity, how hard/easy to use was drush_make? How could it be made better?

Documentation needs love

It's pretty easy, all things considered. There's a little fuzziness in some of the syntax that makes it opaque. For example:

$projects[] = cck;
$projects[cck] = 2.4;
$projects[cck][version] = 2.4;
projects[cck][download][revision] = DRUPAL-6--2-4

That aspect could be improved. Plus the missing features (translations, recursions into modules and themes...) - those are the details that will make it revolutionary.

Plus we have to teach module maintainers how do best handle external libraries so that drush make can always get them.

Work to be done, but definitely the right direction. Thanks Dmitri!

-Rob

Thanks

Thanks Rob, good job. It´s really pretty easy and helped me a lot.

Windows?

Does this all work equally well under Windows XP?

Don't know.

Probably not, unless you're running some *nix shell emulator that has basic commands like mv, cp, mkdir and rm.

-Rob

drush comes with

drush comes with instructions about how to get up and running on windows. it isn't that hard.

there may be a few pieces of drush_make that are untsted on windows but drush itself works well.

Then what?

Could you comment on how much manual configuring needs to be done to get ApacheSolr working after doing the make in this way?

Thanks!

You still need a Solr server

which is described here: http://jamonation.com/node/856

But at least Drush Make relieves you of the external dependency on the PHP side.

-Rob

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.

More information about formatting options