Drush Make comes to Installation Profiles

By Dmitri Gaskin  |  Posted in , , , ,   |  December 3rd, 2009

Drush Make, a module of mine, has been making waves in the Drupal community since it was released. Its primary goal is to take a file defining a list of modules and themes, or in Drush Make lingo, projects, and create a fully operational Drupal site out of them. Now you can use these same Drush Make files in installation profiles and they will be properly packaged on drupal.org.

Installation Profiles traditionally have been a piece of PHP code that tells Drupal what to do when the site is installed. When one used to download that install profile, they would just get that file. If the install profile author wanted modules used besides code module (for example, a WYSIWYG), one would have to download it after they download the profile. However, Drush Make has changed this.

Drupal.org, using Drush Make as a backend, now allows modules and themes to come with profiles, all in the same file. This represents a major step in installation profiles, as now they are much more useful.

On Drupal.org, you are offered the option of downloading either just the profile, the profile along with its projects, or a full Drupal Core with the profile and its projects. Drupal.org also presents you with a list of projects that are included in the package. If any of the modules are out of date, it alerts you, so you can download new, up to date ones once you've downloaded the package.

Writing a makefile is pretty simple - all it needs to specify is a list of projects and their versions. Beyond that, it follows the standard .info file format used in other places, like module.info files.

A normal makefile would look like this:

core = 6.14
projects[cck] = 2.3
projects[views] = 2.7

This code code would be put in a file called {profilename}.make and checked into CVS along with the .profile file. For more documentation, please read How to package a profile on drupal.org.

If you already have a makefile, you can use a drush command to convert it to a drupal.org friendly format (drupal.org restricts the properties in the .make file for legal reasons): drush convert makefile myprofile.make myprofile-drupalorg.make

Overall, I think that Drush Make represents a major shift in install profiles. In the future, we can see lots more install profiles being created. Many (if not most) sites will start out their life as a .make file. And perhaps most importantly, people will share their makefiles with others and everyone will end up winning.

Thanks to Young Hahn and Suzanne Popkin for reading and contributing to this post.

Drush Make is an absolute game changer. Your efforts and ingenuity at putting this module together are extremely appreciated. We're all so lucky to have developers like yourself in the Drupal community. Thank you so much!

Nice to see you in the Planet, Dmitri. ;)

Just wanted to note that a few of the details changed for how this is handled on drupal.org:

A) In cases where an installation profile wants a default .make file that builds the whole thing, even 3rd party code, if they don't want drupal.org to try to do a partial/incomplete distribution package, they need to be able to opt-out of the automated packaging. So, we no longer fall back at try to package profile_name.make if it exists...

B) The .make file read by drupal.org is just called drupal-org.make, not profile_name-drupalorg.make. Since we're only searching for a single file, it was a lot easier to document this way, and (we hope) easier for profile maintainers to get it right...

Also, there are a few typos in your post:

- "wanted modules used besides code module"

s/code/core/ -- I know you write a lot of code, but... ;)

- "This code code would be put in a file called"

duplicate "code" ...

Thanks again for all your work on drush make!

-Derek (dww) http://3281d.com/bio/derek

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <object><embed> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <br> <img> <h4> <h5> <blockquote>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options