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 1171
The drush Project Manager

Code

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

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

  foreach ($info as $name => $project) {
    $header = dt('------- RELEASES FOR \'!name\' PROJECT -------', array('!name' => strtoupper($name)));
    $rows = array();
    $rows[] = array(dt('Release'), dt('Date'), dt('Status'));
    $releases = _drush_pm_filter_releases($project['releases'], drush_get_option('all', FALSE), drush_get_option('dev', FALSE));
    foreach ($releases as $release) {
      $rows[] = array(
        $release['version'],
        gmdate('Y-M-d', $release['date']),
        implode(', ', $release['release_status']),
      );
    }
    drush_print($header);
    drush_print_table($rows, TRUE, array(0 => 14));
  }

  return $info;
}