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

Move provision-context option into aliases.

parent b8f3d2b6
...@@ -39,7 +39,7 @@ function drush_provision_hostmaster_install($site) { ...@@ -39,7 +39,7 @@ function drush_provision_hostmaster_install($site) {
$data['provision-service-http'] = 'apache'; $data['provision-service-http'] = 'apache';
$data['provision-service-db'] = 'mysql'; $data['provision-service-db'] = 'mysql';
$data['provision_context'] = 'server'; $data['provision-context'] = 'server';
$data['parent_path'] = $parent_path; $data['parent_path'] = $parent_path;
$data['script_user'] = drush_get_option('script_user', 'aegir'); $data['script_user'] = drush_get_option('script_user', 'aegir');
$data['web_group'] = drush_get_option('web_group', _provision_default_web_group()); $data['web_group'] = drush_get_option('web_group', _provision_default_web_group());
...@@ -58,7 +58,7 @@ function drush_provision_hostmaster_install($site) { ...@@ -58,7 +58,7 @@ function drush_provision_hostmaster_install($site) {
// verify the current platform // verify the current platform
drush_backend_invoke('provision-verify', array( drush_backend_invoke('provision-verify', array(
'root' => $platform, 'root' => $platform,
'provision_context' => "platform", 'provision-context' => "platform",
'publish_path' => $platform, 'publish_path' => $platform,
'platform' => '5') // dirty hardcoded to create the first platform apache config 'platform' => '5') // dirty hardcoded to create the first platform apache config
// this will become unnecessary when we have drush aliases // this will become unnecessary when we have drush aliases
...@@ -71,7 +71,7 @@ function drush_provision_hostmaster_install($site) { ...@@ -71,7 +71,7 @@ function drush_provision_hostmaster_install($site) {
'root' => $platform, 'root' => $platform,
'client_email' => drush_get_option('client_email', 'webmaster@localhost'), 'client_email' => drush_get_option('client_email', 'webmaster@localhost'),
'profile' => "hostmaster", 'profile' => "hostmaster",
'provision_context' => "site", 'provision-context' => "site",
'site_port' => drush_get_option('web_port', 80)), 'site_port' => drush_get_option('web_port', 80)),
'GET', TRUE 'GET', TRUE
); );
......
...@@ -66,8 +66,7 @@ function _provision_context_init() { ...@@ -66,8 +66,7 @@ function _provision_context_init() {
return TRUE; return TRUE;
} }
$context = drush_get_option('provision_context'); $context = drush_get_option('provision-context');
// todo could probably clean this up, may want to throw errors
if (($context === 'platform' || $context === 'site') && drush_bootstrap_validate(DRUSH_BOOTSTRAP_DRUPAL_ROOT)) { 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. // i don't think i should be bootstrapping here yet ... but i have no choice yet.
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_ROOT); drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_ROOT);
......
...@@ -221,17 +221,17 @@ function drush_http_provision_named_context_save() { ...@@ -221,17 +221,17 @@ function drush_http_provision_named_context_save() {
} }
drush_set_option('parent', '@' . implode(',@', $parents)); 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(); $config->write();
} }
elseif (PROVISION_CONTEXT_PLATFORM) { 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(); $config->write();
} }
elseif (PROVISION_CONTEXT_SITE) { elseif (PROVISION_CONTEXT_SITE) {
drush_set_option('uri', drush_get_option('provision-uri')); drush_set_option('uri', drush_get_option('provision-uri'));
drush_set_option('root', drush_get_option('publish_path')); 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(); $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