Skip to content

Instantly share code, notes, and snippets.

@karma86
Last active December 17, 2015 12:09
Show Gist options
  • Select an option

  • Save karma86/5607939 to your computer and use it in GitHub Desktop.

Select an option

Save karma86/5607939 to your computer and use it in GitHub Desktop.
Drupal site install in seconds

Using drush with .make files

Drush make file is a plain-text file, which describes the components of a drupal installation. Drush can use it to create ready-to-use drupal sites, pulling sources from various locations. It does this by parsing a makefile and downloading the sources it describes. In practical terms, this means that it is possible to distribute a complicated Drupal distribution as a single text file.

Using a .make generator

  • Select the version of drupal you want to install
  • Select the modules you want
  • Select the libaries you want to use
  • Add more modules,libraries and themes (optional)
  • Generate makefile and save it to server

On console run:

drush make drush-make.make /home/www/dev-site/

Generate a makefile from an existing site

In case you have an existing site and you want to extract into a .make file all the installed modules with their version

On console run:

drush generate-makefile drush-make-new.make

Then you can use it like any other .make file.

; This file was auto-generated by drush make
core = 7.x
api = 2
projects[drupal][version] = "7.22"
; Modules
projects[admin_menu][version] = "3.0-rc4"
projects[ctools][version] = "1.3"
projects[devel][version] = "1.3"
projects[entity][version] = "1.1"
projects[libraries][version] = "2.1"
projects[module_filter][version] = "1.7"
projects[omega_tools][version] = "3.0-rc4"
projects[rules][version] = "2.3"
projects[views][version] = "3.7"
projects[views_slideshow][version] = "3.0"
projects[webform][version] = "3.18"
projects[xmlsitemap][version] = "2.0-rc2"
; Themes
projects[omega][version] = "3.1"
; Libraries
; Please fill the following out. Type may be one of get, git, bzr or svn,
; and url is the url of the download.
libraries[jquery][download][type] = ""
libraries[jquery][download][url] = ""
libraries[jquery][directory_name] = "jquery"
libraries[jquery][type] = "library"
; Please fill the following out. Type may be one of get, git, bzr or svn,
; and url is the url of the download.
libraries[jqueryui][download][type] = ""
libraries[jqueryui][download][url] = ""
libraries[jqueryui][directory_name] = "jqueryui"
libraries[jqueryui][type] = "library"
; ----------------
; Generated makefile from http://drushmake.me
; Permanent URL: http://drushmake.me/file.php?token=b21bc45fbe99
; ----------------
;
; This is a working makefile - try it! Any line starting with a `;` is a comment.
; 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 its Drush Make API version. This version of
; drush make uses API version `2`.
api = 2
; Core project
; ------------
; In order for your makefile to generate a full Drupal site, you must include
; a core project. This is usually Drupal core, but you can also specify
; alternative core projects like Pressflow. Note that makefiles included with
; install profiles *should not* include a core project.
; Drupal 7.x. Requires the `core` property to be set to 7.x.
projects[drupal][version] = 7
; Modules
; --------
projects[admin_menu][version] = 3.0-rc4
projects[admin_menu][type] = "module"
projects[module_filter][version] = 1.7
projects[module_filter][type] = "module"
projects[devel][version] = 1.3
projects[devel][type] = "module"
projects[libraries][version] = 2.1
projects[libraries][type] = "module"
projects[omega][version] = 3.1
projects[omega][type] = "module"
projects[rules][version] = 2.3
projects[rules][type] = "module"
projects[views][version] = 3.7
projects[views][type] = "module"
projects[views_slideshow][version] = 3.0
projects[views_slideshow][type] = "module"
projects[fivestar][version] = 2.0-alpha2
projects[fivestar][type] = "module"
projects[webform][version] = 3.18
projects[webform][type] = "module"
projects[xmlsitemap][version] = 2.0-rc2
projects[xmlsitemap][type] = "module"
; Themes
; --------
; Libraries
; ---------
libraries[jquery][download][type] = "file"
libraries[jquery][download][url] = "https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
libraries[jqueryui][download][type] = "file"
libraries[jqueryui][download][url] = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment