Drush Make and Profiler - a brief overview

Most coders are familiar with Drush Make. So I'll skip that part for now. Suffice to say that a .make file is a list of projects, modules, features and even profiles that will be fetched and installed when you use the drush make yourMakefile.make pathToDir command.

a basic makefile

Note that recursion is supported. In short, a project can itself contain a makefile.

Another neat trick is the possibility to generate a makefile for an existing website with the command drush make-generate. Although the output isn't perfect (i.e. [type] and [url] for custom modules & themes need to be filled manually), this is a great way to get an overview of the makings of a Drupal installation.

As for Profiler it facilitates the creation of installation profiles by making it possible to use the .info syntax to enable modules, set variables (e.g. site name), create users and nodes when you initialize a Drupal installation. All this without having to write a single line of php. That's great news for non-coders and coders alike.

.info file of a basic distro

An installtion profile consists of 3 files and an overarching makefile. For a profile named news7, the 3 files are: news7.info, news7.make and news7.profile. The .profile file will at least contain the php snippet that allows Profiler to do its magic. You can also add code that will perform additional tricks at install time.

.make file of a basic distro

The overarching or parent makefile of the installation profile follows.

overarching makefile of a basic distro

What's the difference between a distribution and a profile you ask?

According to dmitrig01, the author of Drush Make, and as far I understand it, an install profile is JUST THE CODE that runs on the initial installation of Drupal that, for example, enables modules and sets a theme. Where as a distribution is the installation profile plus the required modules.

Another point worth noting, as of Drupalcon Chicago or (drush_make 4.2 I believe), Drush Make will install all modules in site/all/modules. When using Profiler, all projects listed in the profile's makefile will be downloaded to the profiles directory. There is an interesting discussion about the pros and cons of using these locations and for what purpose. Definitely worth the read.

Wrapping up, here are a fews links and references. Hope this helps. Also, feel free to comment and/or correct errors and misconceptions. This is still all very new to me.

Links and references

Kudos to dmitrig01 and q0rban for writing Drush Make and Profiler!

Comments

this is really a great one thanks for sharing...

Abrielle

I've seen quite a few, and *nearly* understood what I needed, but I hadn't fully grokked how it all worked together until reading this blog post. And, you used far fewer words to do so - clear and succinct. Thank you! All the best, Richard aka siliconmeadow on d.o

Add new comment

Plain text

  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
Refresh Type the characters you see in this picture.
Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.