| 1 |
### About:
|
| 2 |
|
| 3 |
Drush_make is an extension to drush that can create a ready-to-use drupal site,
|
| 4 |
pulling sources from various locations. It does this by parsing a flat text
|
| 5 |
file (similar to a drupal .info file) and downloading the sources it describes.
|
| 6 |
In practical terms, this means that it is possible to distribute a complicated
|
| 7 |
Drupal distribution (such as Development Seed's Managing News) as a single text
|
| 8 |
file.
|
| 9 |
|
| 10 |
Among drush_make's capabilities are:
|
| 11 |
* Downloading Drupal core, as well as contrib modules from drupal.org.
|
| 12 |
* Checking code out from CVS, SVN, git, bzr, and hg repositories.
|
| 13 |
* Getting plain .tar.gz and .zip files (particularly useful for libraries
|
| 14 |
that can not be distributed directly with drupal core or modules).
|
| 15 |
* Fetching and applying patches.
|
| 16 |
* Fetching modules, themes, and installation profiles, but also external
|
| 17 |
libraries.
|
| 18 |
|
| 19 |
### Usage
|
| 20 |
|
| 21 |
drush make {filename.make}
|
| 22 |
|
| 23 |
### .make file format
|
| 24 |
|
| 25 |
The make file always begins by specifying the core version of Drupal, such as
|
| 26 |
the following:
|
| 27 |
====
|
| 28 |
core = 6.x
|
| 29 |
====
|
| 30 |
|
| 31 |
Then, it goes on to specify a list of projects.
|
| 32 |
For example, this code would download the latest release of Drupal.
|
| 33 |
====
|
| 34 |
core = 6.x
|
| 35 |
projects[] = drupal
|
| 36 |
====
|
| 37 |
|
| 38 |
More projects may be downloaded in that fashion. This code downloads Drupal
|
| 39 |
core along with the contributed modules CCK and Views.
|
| 40 |
====
|
| 41 |
core = 6.x
|
| 42 |
projects[] = drupal
|
| 43 |
projects[] = cck
|
| 44 |
projects[] = views
|
| 45 |
====
|
| 46 |
|
| 47 |
You can also specify specific versions of each module:
|
| 48 |
====
|
| 49 |
projects[cck] = 2.6
|
| 50 |
projects[views] = 2.7
|
| 51 |
====
|
| 52 |
|
| 53 |
NOTE: The first and second form of specifying projects are mutually exclusive.
|
| 54 |
If you use the second (including the variations described below) form with the
|
| 55 |
project name in []'s, DO NOT specify the same project as projects[] = <project>
|
| 56 |
|
| 57 |
You can also specify more instructions about what to do with the module. For
|
| 58 |
example, use the following syntax to apply a patch to a module:
|
| 59 |
====
|
| 60 |
projects[adminrole][patch][] = "http://drupal.org/files/issues/adminrole_exceptions.patch"
|
| 61 |
====
|
| 62 |
|
| 63 |
To place a module in a subdirectory of sites/all/modules, the following code
|
| 64 |
can be used:
|
| 65 |
====
|
| 66 |
projects[cck][subdir] = "contrib"
|
| 67 |
====
|
| 68 |
|
| 69 |
This code puts CCK in a subdirectory and specifies a specific version:
|
| 70 |
====
|
| 71 |
projects[cck][subdir] = "contrib"
|
| 72 |
projects[cck][version] = 2.6
|
| 73 |
====
|
| 74 |
|
| 75 |
Drush_make can also download projects from other servers besides drupal.org, so
|
| 76 |
long as they output the proper XML format. For example:
|
| 77 |
====
|
| 78 |
projects[tao][location] = "http://code.developmentseed.com/fserver"
|
| 79 |
====
|
| 80 |
|
| 81 |
While drush_make can automatically detect the type of project (i.e. module,
|
| 82 |
theme, installation profile) when downloading from drupal.org or another
|
| 83 |
update XML server, it must be told what type of project it is downloading
|
| 84 |
if the project is hosted somewhere else.
|
| 85 |
|
| 86 |
To download a custom theme from an arbitrary location:
|
| 87 |
====
|
| 88 |
projects[mytheme][type] = "theme"
|
| 89 |
projects[mytheme][download][type] = "svn"
|
| 90 |
projects[mytheme][download][url] = "http://example.com/svnrepo/cool-theme/"
|
| 91 |
projects[mytheme][download][branch] = "production"
|
| 92 |
====
|
| 93 |
|
| 94 |
To export from Drupal CVS
|
| 95 |
====
|
| 96 |
projects[cck][download][type] = "cvs"
|
| 97 |
projects[cck][download][module] = "contributions/modules/cck"
|
| 98 |
projects[cck][download][revision] = "DRUPAL-6--1"
|
| 99 |
====
|
| 100 |
|
| 101 |
To download an external library (this will be placed in sites/all/libraries by default):
|
| 102 |
====
|
| 103 |
libraries[tinymce][download][type] = "get"
|
| 104 |
libraries[tinymce][download][url] = "http://downloads.sourceforge.net/project/tinymce/TinyMCE/3.2.7/tinymce_3_2_7.zip"
|
| 105 |
libraries[tinymce][directory_name] = "tinymce"
|
| 106 |
====
|
| 107 |
|
| 108 |
To download an external library and place it in an alternate location (this
|
| 109 |
code downloads jQuery UI and places it in modules/jquery_ui/jquery.ui):
|
| 110 |
====
|
| 111 |
libraries[jquery_ui][download][type] = "get"
|
| 112 |
libraries[jquery_ui][download][url] = "http://jquery-ui.googlecode.com/files/jquery.ui-1.6.zip"
|
| 113 |
libraries[jquery_ui][directory_name] = jquery.ui
|
| 114 |
libraries[jquery_ui][destination] = modules/jquery_ui
|
| 115 |
====
|
| 116 |
|
| 117 |
### Recursion
|
| 118 |
|
| 119 |
If a profile downloaded by drush_make includes a .make file, drush_make will automatically
|
| 120 |
parse it. This means that it is possible to create a makefile that is simply a pointer to
|
| 121 |
the repository for your install profile.
|
| 122 |
====
|
| 123 |
core = 6.x
|
| 124 |
projects[] = drupal
|
| 125 |
projects[] = managingnews
|
| 126 |
====
|