Commit 56693824 authored by drumm's avatar drumm Committed by Neil Drumm

Move provision-context option into aliases.

parent b8f3d2b6
......@@ -39,7 +39,7 @@ function drush_provision_hostmaster_install($site) {
$data['provision-service-http'] = 'apache';
$data['provision-service-db'] = 'mysql';
$data['provision_context'] = 'server';
$data['provision-context'] = 'server';
$data['parent_path'] = $parent_path;
$data['script_user'] = drush_get_option('script_user', 'aegir');
$data['web_group'] = drush_get_option('web_group', _provision_default_web_group());
......@@ -58,7 +58,7 @@ function drush_provision_hostmaster_install($site) {
// verify the current platform
drush_backend_invoke('provision-verify', array(
'root' => $platform,
'provision_context' => "platform",
'provision-context' => "platform",
'publish_path' => $platform,
'platform' => '5') // dirty hardcoded to create the first platform apache config
// this will become unnecessary when we have drush aliases
......@@ -71,7 +71,7 @@ function drush_provision_hostmaster_install($site) {
'root' => $platform,
'client_email' => drush_get_option('client_email', 'webmaster@localhost'),
'profile' => "hostmaster",
'provision_context' => "site",
'provision-context' => "site",
'site_port' => drush_get_option('web_port', 80)),
'GET', TRUE
);
......
......@@ -66,8 +66,7 @@ function _provision_context_init() {
return TRUE;
}
$context = drush_get_option('provision_context');
// todo could probably clean this up, may want to throw errors
$context = drush_get_option('provision-context');
if (($context === 'platform' || $context === 'site') && drush_bootstrap_validate(DRUSH_BOOTSTRAP_DRUPAL_ROOT)) {
// i don't think i should be bootstrapping here yet ... but i have no choice yet.
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_ROOT);
......
......@@ -221,17 +221,17 @@ function drush_http_provision_named_context_save() {
}
drush_set_option('parent', '@' . implode(',@', $parents));
$config = new provisionConfig_drushrc_alias(array(drush_get_option('hosting_name') => array('parent')));
$config = new provisionConfig_drushrc_alias(array(drush_get_option('hosting_name') => array('parent', 'provision-context')));
$config->write();
}
elseif (PROVISION_CONTEXT_PLATFORM) {
$config = new provisionConfig_drushrc_alias(array(drush_get_option('hosting_name') => array('parent', 'publish_path')));
$config = new provisionConfig_drushrc_alias(array(drush_get_option('hosting_name') => array('parent', 'provision-context', 'publish_path')));
$config->write();
}
elseif (PROVISION_CONTEXT_SITE) {
drush_set_option('uri', drush_get_option('provision-uri'));
drush_set_option('root', drush_get_option('publish_path'));
$config = new provisionConfig_drushrc_alias(array(drush_get_option('hosting_name') => array('parent', 'root', 'uri', 'site_port', 'site_id', 'language')));
$config = new provisionConfig_drushrc_alias(array(drush_get_option('hosting_name') => array('parent', 'provision-context', 'root', 'uri', 'site_port', 'site_id', 'language')));
$config->write();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment