function hosting_hosting_platform_context_options in Hosting 7.4
Same name and namespace in other branches
- 6.2 platform/hosting_platform.drush.inc \hosting_hosting_platform_context_options()
- 7.3 platform/hosting_platform.drush.inc \hosting_hosting_platform_context_options()
Implements hook_hosting_TASK_OBJECT_context_options().
File
- platform/
hosting_platform.drush.inc, line 10 - Implement drush hooks for the Platforms module.
Code
function hosting_hosting_platform_context_options(&$task) {
$task->context_options['server'] = '@server_master';
$task->context_options['web_server'] = hosting_context_name($task->ref->web_server);
// Trim the path so we dont pass extra spaces.
$task->context_options['root'] = trim($task->ref->publish_path, " ");
if ($task->ref->makefile) {
$task->context_options['makefile'] = $task->ref->makefile;
}
if (isset($task->ref->make_working_copy) && !empty($task->ref->make_working_copy)) {
$task->context_options['make_working_copy'] = $task->ref->make_working_copy;
}
// Pass git options.
$task->context_options['git_root'] = $task->ref->git_root;
$task->context_options['git_remote'] = $task->ref->git_remote;
$task->context_options['git_reference'] = $task->task_args['target_git_reference'] ?: $task->ref->git_reference;
$task->context_options['git_docroot'] = $task->ref->git_docroot;
$task->context_options['git_reset'] = $task->ref->git_reset;
}