Drush Make: How to create a drush make file to use a custom profile installation

Following Drush Make: How to create a drush make file I am going now explain how to create a drush make file that download the latest drupal version, a custom profile and some basic modules.
In order to achieve this goal, we need 2 drush make files and one installation profile in git.

Step 1: Create a profile Installation.

Let's start creating a new profile. For simplicity I have copied the standard profile from drupal core and changed all files name and functions name from standard to custom_profile. I have also modified .info file removing overlay on installation and added few more modules to be enabled during site installation.

 
Step 2: Create a drush make file to download default modules.

After we create our new profile we can add your .make file within our profile folder omitting the Drupal core project. In my example ti will be called custom_profile.make

; Drush Make API version. 
api = 2
 
; Drupal core version.
core = 7.x
 
; Common modules 
projects[admin_menu][subdir] = "contrib"
projects[context][subdir] = "contrib"
projects[ctools][subdir] = "contrib"
projects[date][subdir] = "contrib"
projects[entity][subdir] = "contrib"
projects[link][subdir] = "contrib"
projects[module_filter][subdir] = "contrib"
projects[pathauto][subdir] = "contrib"
projects[strongarm][subdir] = "contrib"
projects[token][subdir] = "contrib"
projects[views][subdir] = "contrib"
 
; Development
projects[backup_migrate][subdir] = "devel"
projects[devel][subdir] = "devel"
 
; Features
projects[diff][subdir] = "contrib"
projects[features][subdir] = "contrib"
projects[features_diff][subdir] = "contrib"
projects[features_extra][subdir] = "contrib"
 
; Libraries
projects[libraries][subdir] = "contrib"

 

Push it up to GitHub or BitBucket. https://github.com/VincenzoGambino/drupal-custom_profile-with-drush

 
Step 3: Create the main make file.

Create the drush make file that contains Drupal core and the link to profile repo Gihub. In my example I will call it drupalwithprofile.make

; Drush Make API version. 
api = 2
; Latest version of drupal core.
core = 7.x
projects[] = drupal
 
; Custom profile
projects[custom_profile][type] = "profile"
projects[custom_profile][download][type] = "git"
projects[custom_profile][download][url] = "https://github.com/VincenzoGambino/custom_profile.git"
projects[custom_profile][download][branch] = "master"

Now if you run drush make mydrupal.make it will download latest version of Drupal core then it will get the custom_profile from Git and will automatically detect the second .make file, custom_profile.make, and run it downloading all the modules specified in the make file.

Resources:
Custom profile: https://github.com/VincenzoGambino/drupal-custom_profile-with-drush
Drupal with profile: https://github.com/VincenzoGambino/drupalwithprofile