function drush_make_convert_make_to_yml

master make.drush.inc drush_make_convert_make_to_yml($info)

Converts a drush info array to a YAML array.

Parameters

array $info: A drush make info array.

Return value

string A yaml encoded info array.

1 call to drush_make_convert_make_to_yml()
drush_make_convert in commands/make/make.drush.inc
Command callback; convert make file format.

File

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

Code

function drush_make_convert_make_to_yml($info) {
  // Remove incorrect value.
  unset($info['format']);

  // Replace "*" with "~" for project versions.
  foreach ($info['projects'] as $key => $project) {
    if ($project['version'] == '*') {
      $info['projects'][$key]['version'] = '~';
    }
  }

  $dumper = drush_load_engine('outputformat', 'yaml');
  $output = $dumper->format($info, array());

  return $output;
}