You are here

function drush_deploy_flatten_plan in Deploy - Content Staging 7.3

Command callback for flattening a deployment plan.

File

./deploy.drush.inc, line 265
Provides Drush integration for Deploy.

Code

function drush_deploy_flatten_plan($name) {
  $plan = deploy_plan_load($name);
  if (FALSE === $plan) {
    return drush_set_error(dt("Plan '@name' doesn't exist.", array(
      '@name' => $name,
    )));
  }
  if (!$plan
    ->flatten()) {
    return drush_set_error(dt("Unable to flatten plan '@name' at this time.", array(
      '@name' => $name,
    )));
  }
  drush_print(dt("Plan '@name' has been flattened.", array(
    '@name' => $name,
  )));
  return DRUSH_SUCCESS;
}