function drush_pm_releases

8.0.x pm.drush.inc drush_pm_releases()
6.x pm.drush.inc drush_pm_releases()
7.x pm.drush.inc drush_pm_releases()
3.x pm.drush.inc drush_pm_releases()
4.x pm.drush.inc drush_pm_releases()
5.x pm.drush.inc drush_pm_releases()
master pm.drush.inc drush_pm_releases()

Command callback. Show available releases for given project(s).

File

commands/pm/pm.drush.inc, line 1238
The drush Project Manager

Code

function drush_pm_releases() {
  if (!$requests = pm_parse_arguments(func_get_args(), FALSE)) {
    $requests = array('drupal');
  }

  // Parse out project name and version.
  $requests = pm_parse_project_version($requests);

  $info = release_info_get_releases($requests);
  drush_backend_set_result($info);
  if (!$info) {
    return drush_log(dt('No valid projects given.'), 'ok');
  }

  $all = drush_get_option('all', FALSE);
  $dev = drush_get_option('dev', FALSE);
  foreach ($info as $name => $project) {
    $releases = release_info_filter_releases($project['releases'], $all, $dev);
    foreach ($releases as $key => $release) {
      $rows[$key] = array(
        'project' => $name,
        'version' => $release['version'],
        'date' => gmdate('Y-M-d', $release['date']),
        'status' => implode(', ', $release['release_status']),
      );
    }
  }
  return $rows;
}