7

I use make files for a number of different flavours of sites that I build, then manually insert my own profile into the site/profiles/ directory. Can drush make download and automatically insert the profile folder into the correct place?

Thanks

Kieran

9

Sure. Take a look at the file drupalorg_testing.make.bootstrap in the drupalorg_testing project. The relevant part is:

projects[drupalorg_testing][type] = "profile"
projects[drupalorg_testing][download][type] = "git"
projects[drupalorg_testing][download][revision] = "master"

Usually, when building a profile, you will download only Drupal core and the profile in the bootstrap makefile, and put all of your other modules in the makefile that is bundled in the profile. If you are making a makefile that makes use of someone else's profile, then you may include your additional modules in your top-level (bootstrap) makefile.

If you ever want to move a module from one location to another, you'll want to use the registry rebuild tool. It will fix up the system table to account for the module's new location.

  • So you put a separate make file without the drupal project into a profile folder and then call that folder using a bootstrap make file? – Wheelz Apr 17 '12 at 21:33
  • Yep. Download the whole drupalorg_testing project (or browse it on drupal.org) for an example. This is a rather complicated example, but the concept is simple enough; you are only concerned with the two makefiles at this point. Note that modules installed via the profile's makefile will not go in sites/all/modules, but will end up in the profile's modules folder. This is why I mentioned registry rebuild, above; if you move a module from the bootstrap makefile to the profile makefile (or visa-versa), you'll need to either reinitialize the database or run registry rebuild to fix it up. – greg_1_anderson Apr 17 '12 at 22:27
  • You might also be interested in previewing drupal.org/node/1368242, which will automatically create an installation profile from a working Drupal site. – greg_1_anderson Sep 5 '12 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.