You are here

function hosting_platform_drush_context_import in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 platform/hosting_platform.drush.inc \hosting_platform_drush_context_import()
  2. 7.3 platform/hosting_platform.drush.inc \hosting_platform_drush_context_import()

Implements hook_drush_context_import().

File

platform/hosting_platform.drush.inc, line 36
Implement drush hooks for the Platforms module.

Code

function hosting_platform_drush_context_import($context, &$node) {
  if ($context->type == 'platform') {
    if (!isset($node->title)) {
      $node->title = str_replace('platform_', '', trim($context->name, '@'));
    }
    $node->web_server = hosting_context_nid($context->web_server);
    $node->publish_path = $context->root;
    $node->makefile = $context->makefile;
    if (isset($context->make_working_copy) && !empty($context->make_working_copy)) {
      $node->make_working_copy = $context->make_working_copy;
    }

    // Import git options from the context.
    $node->git_root = $context->git_root;
    $node->git_remote = $context->git_remote;
    $node->git_reference = $context->git_reference;
    $node->git_reset = $context->git_reset;
    $node->git_docroot = $context->git_docroot;
  }
}