Start You Own Drupal Distribution with Drush Make. Part 1.
As a rule, we get used to enjoy some limited set of trusted modules, especially if we often have to work on typical projects.
I remember when I started working with Drupal, every time for each new project I collected fresh new versions of my favorite modules on Drupal.org. It was monotonic mannual work and I wast a lot of time before starting new Drupal installation.
But after meeting with Drush Make I was really happy!
I will not tell about the installing this extension of Drupal Shell, yet immediately move on to writing .make file.
First of all we should start with two service lines:; Core version
; ------------
; Each makefile should begin by declaring the core version of Drupal that all
; projects should be compatible with.
core = 7.x; API version
; ------------
; Every makefile needs to declare it's Drush Make API version. This version of
; drush make uses API version "2".
api = 2
After that we need to indicate core version that we are going to use. To use the latest Drupal version we should write only following:projects[drupal][type] = core
We can also type the version of the core that we need. In this case our .make file will be following:core = 7.x
api = 2
projects[drupal][type] = core
projects[drupal][version] = 7.8
But we can use also PressFlow as core for our distribution. There is no any other way to obtaine PressFlow only to get it from GitHub.
For this porpouse pressflow.make was created:core = 7.x
api = 2
projects[pressflow][type] = core
projects[pressflow][download][type] = git
projects[pressflow][download][url] = git://github.com/pressflow/7.git
If you have this file you can type:$ drush make --prepare-install --tar pressflow.make pressflow
And in several minutes have pressflow.tar.gz
Ok, I describe below what each argument of drush make command means.
--prepare-install mean that Drush Make prepare "files" folder and "settings.php" file future installation, I remember I had often had to do it manually :-)
--tar will do archive .tar.gz with your distro.
The following parameters are the name of the our make file and the name of the target archive or folder if we miss --tar parameter.
Let's talk about how to add modules and themes in our distribution. Fairly complete documentation you can be find on http://drupalcode.org/project/drush_make.git/blob_plain/refs/heads/6.x-2.x:/README.txt. But I'm going to provide several examples to cover main part of content of the document.
Lets start with modules. There is a good practice to put all contributed modules in the folder "sites/all/modules/contrib", and put your custom modules into "sites/all/modules/custom". I like Backup&Migrate module so I put it into each my distribution:
projects[backup_migrate][subdir] = "contrib"
In this case Drush Make get recommended version of the module and put it into "sites/all/modules/contrib".
But in some cases there is no recommended version, or if you want to use some selected version, you should input it in the instructions to Drush Make:
For example, if you want to use Defaul Content module, you should indicate the version of the module, because this modul have no recommended version yet:
projects[defaultcontent][subdir] = "contrib"
projects[defaultcontent][version] = "1.0-alpha4"
Also you can get latest version of module directly from GIT:
projects[addthis][subdir] = "contrib"
projects[addthis][download][type] = "git"
projects[addthis][download][url] = "http://git.drupal.org/project/addthis.git"
projects[addthis][download][branch] = "7.x-2.x"
How to add themes?
projects[omega][type] = "theme"
We should touch at list one parameter to include project into distro, so we indicate that Omega is theme, but it is obvious for us.
And finnaly we can include in our distributions third party libraries, for example lets add colorbox to our distribution:
libraries[colorbox][download][type] = "get"
libraries[colorbox][download][url] = "http://colorpowered.com/colorbox/latest"
libraries[colorbox][directory_name] = "colorbox"
The code will be putted into "sites/all/libraries/colorbox" folder.
I think this information will be enough to start you own experiments. I'm going to create the second part of the tutorial. Waiting the updates in my Blog.
Thanks!
Comments
Teenage (not verified)
Tue, 03/27/2012 - 17:29
Permalink
Pressflow Update error
With the pressflow settings I've got a update error each time I go to module admin page :
Undefined index: drupal in update_requirements(), line 36 in /var/www/pressflow/www/modules/update/update.instal.
I suppose it's ok since we don't want our pressflow file be override by durpal ones, but this message is quite annoying, is there a solution ?
I edit the update.instal file, and replace the "drupal" index by "pressflow", is there any other solution. I guess thaht if we use :
projects[drupal][type] = core
projects[drupal][download][type] = git
projects[drupal][download][url] = git://github.com/pressflow/7.git
The next update will replace pressflow core files by drupal ones ?
The best way will certainly be to use a [location], but does someone know is there an pressflow xml update url ?
This file look for a "drupal" project,
no fax payday loans (not verified)
Mon, 05/14/2012 - 19:44
Permalink
no fax payday loans
kahlnw http://paydayloansdf.com/ no fax payday loans cxJtTV http://paydayloansdf.ca/ pay day loans 7877 http://paydayloansdf.co.uk/ same day loan 2368
amoxil (not verified)
Mon, 05/14/2012 - 21:23
Permalink
amoxil
gdsqce http://rx-pillole24.it/generic-amoxil.html amoxil 2820 http://pharmaciecher.fr/generic-accutane.html accutane >:-[ http://las-pastillas24.eu/generic-zocor.html zocor 9765 http://apothekebillige24.com/generic-viagra.html viagra DDxjKS http://johnmfinan.com/buy-cialis.html cialis online 7509
payday loan (not verified)
Tue, 05/15/2012 - 20:28
Permalink
payday loan
ynkjvok http://paydayloansef.com/ payday loan 6360 http://paydayloansftc.ca/ cash advance loans HOnNB http://paydayloansef.co.uk/ Payday UK 7710
polo outlet online (not verified)
Wed, 05/16/2012 - 10:42
Permalink
Along with perhaps <a href=
Along with perhaps <a href="http://www.polooutletstores.org/">polo outlet online</a> the most appropriate legend with the demonstrate ended up being Melissa Joan Hart, as their newborn ball can be very evident at this stage. She is going to get your ex 3 rd little one throughout a couple of months, consequently with luck , many of the birthing views throughout "What that is expected When you find yourself Expecting" don't shock your ex way too horribly, while she will be been recently along this specific highway ahead of. <a href="http://www.polooutletstores.org/">polo outlet store</a> Regarding Diaz, the idea don't get generating your video for you to shock your ex far from maternity. That will transpired for you to your ex with regards to 15 rice. "I found our brother supply beginning, a new C-section, while i ended up being all day and, " your 39-year-old recalled which has a shiver in the click seminar. "There ended up being similar to body all over the place. Our sister�s guts out on a new plate. <a href="http://www.polooutletstores.org/">polo factory store</a> It turned out nuts. No person need to identify that! The idea improved my well being. "<a href="http://www.polooutletstores.org/">http://www.polooutletstores.org/</a>
http://www.polooutletstores.org/.
cialis sale (not verified)
Wed, 05/16/2012 - 21:12
Permalink
cialis sale
rjpdlob http://marinacuisina.com/buy-cialis.html cialis sale 6786 http://cheapcialis4u.com/ cialis coupon >:-OOO http://realztr.com/ cheap viagra 3271 http://viagra-vs-cialis.biz/ buy viagra >:]] http://marinacuisina.com/cheap-viagra.html cheap viagra OWlah
pay day loans (not verified)
Wed, 05/16/2012 - 21:42
Permalink
pay day loans
ggyonojc http://paydayloansltg.co.uk/ pay day loans 8]]] http://paydayloansltg.com / payday loan JEPmAW http://paydayloansplp.ca/ pay day loans 9737
Unorbfreery (not verified)
Thu, 05/17/2012 - 10:24
Permalink
Test, just da testtoogueanodo
Hi all <a href="http://acheterlecialispharmaceutiques.com/">acheter cialis</a> <a href="http://acheterduviagramedecin.com/">acheter viagra</a>
ScawDuellaDow (not verified)
Thu, 05/17/2012 - 17:55
Permalink
Test, just da testtogeIncot
Hi all <a href="http://acheterlecialispharmaceutiques.com/">acheter cialis</a> <a href="http://acheterduviagramedecin.com/">acheter viagra</a>
payday loans (not verified)
Fri, 05/18/2012 - 05:47
Permalink
payday loans
zheopl http://paydayloansef.ca/ payday loans 5921 http://paydayloansltg.com/ payday loans >:-[ http://paydayloansltv.com/ payday loans wIZmw http://paydayloansjjj.ca/ payday loan Canada 2625 http://paydayloansltv.co.uk/ payday loans %-[[[
payday loans (not verified)
Sat, 05/19/2012 - 11:09
Permalink
payday loans
gkvaiqq http://paydayloanslkm.co.uk/ payday loans aVjJdC http://paydayloanslkm.com/ no fax payday loans 6378 http://paydayloanslkm.ca/ payday loans tSLHos http://autoinsuranceqx.com/ auto insurance %-[[[
Andy (not verified)
Mon, 05/21/2012 - 06:17
Permalink
crOkQQmNVJeDl
No one. These services are ablusote rip off's (all of them). Do what ever you can not to take these loans . Control you spending (you can really do it!!!!!!!). Control your life. Don't give your hard earned money to these people. Pretend this is not an option for you direct the rest of your life on that belief!
Add new comment