function drush_pm_releasenotes

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

Command callback. Show release notes for given project(s).

File

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

Code

function drush_pm_releasenotes() {
  $release_info = drush_get_engine('release_info');

  // Obtain requests.
  if (!$requests = pm_parse_arguments(func_get_args(), FALSE)) {
    $requests = array('drupal');
  }

  // Get installed projects.
  if (drush_get_context('DRUSH_BOOTSTRAP_PHASE') >= DRUSH_BOOTSTRAP_DRUPAL_FULL) {
    $projects = drush_get_projects();
  }
  else {
    $projects = array();
  }

  $status_url = drush_get_option('source');

  $output = '';
  foreach ($requests as $request) {
    $request = pm_parse_request($request, $status_url, $projects);
    $project_release_info = $release_info->get($request);
    if ($project_release_info) {
      $version = empty($request['version']) ? NULL : $request['version'];
      $output .= $project_release_info->getReleaseNotes($version);
    }
  }
  return $output;
}