function make_prepare_request

8.0.x make.drush.inc make_prepare_request($project, $type = 'contrib')
6.x make.drush.inc make_prepare_request($project, $type = 'contrib')
7.x make.drush.inc make_prepare_request($project, $type = 'contrib')
5.x make.drush.inc make_prepare_request($project, $type = 'contrib')
master make.drush.inc make_prepare_request($project, $type = 'contrib')

Create a request array suitable for release_info engine.

This is a convenience function to easily integrate drush_make with drush release_info engine.

@todo: refactor 'make' to internally work with release_info keys.

Parameters

array $project: Project array.

string $type: 'contrib' or 'core'.

1 call to make_prepare_request()
make_prepare_projects in commands/make/make.drush.inc
Gather additional data on all projects specified in the make file.

File

commands/make/make.drush.inc, line 793
Drush Make commands.

Code

function make_prepare_request($project, $type = 'contrib') {
  $request = array(
    'name' => $project['name'],
    'drupal_version' => $project['core'],
    'status url' => $project['location'],
  );
  if ($project['version'] != '') {
    $request['project_version'] = $project['version'];
    $request['version'] = $type == 'core' ? $project['version'] : $project['core'] . '-' . $project['version'];
  }
  return $request;
}