Commit 23b7b5aa authored by mig5's avatar mig5 Committed by mig5

#595494 fix clone alias

parent 4c2121f7
......@@ -35,7 +35,14 @@ function drush_provision_drupal_pre_provision_clone_rollback($url, $new_url, $pl
*/
function drush_provision_drupal_provision_clone($url, $new_url, $platform = null) {
# note that we reset the aliases so they don't conflict with the original site
drush_backend_invoke('provision deploy', array($new_url, drush_get_option('backup_file'), 'root' => $platform, 'aliases' => array(),
'web_host' => drush_get_option('web_host'), 'web_ip' => drush_get_option('web_ip'),
'db_host' => drush_get_option('db_host')));
drush_backend_invoke('provision deploy', array(
$new_url,
drush_get_option('backup_file'),
'root' => $platform,
'aliases' => drush_get_option('aliases'),
'redirection' => drush_get_option('redirection'),
'web_host' => drush_get_option('web_host'),
'web_ip' => drush_get_option('web_ip'),
'db_host' => drush_get_option('db_host')
));
}
......@@ -48,7 +48,6 @@ function drush_provision_drupal_pre_provision_deploy($url, $backup_file) {
$profile = $profiles[0];
$drupal_packages = drush_get_option('packages', array(), 'drupal');
$merged_modules = array_merge($drupal_packages['base']['modules'], $drupal_packages['profiles'][$profile]['modules']);
foreach ($site_packages['modules'] as $name => $module) {
if ($module['status'] == 1) {
......@@ -81,6 +80,7 @@ function drush_provision_drupal_pre_provision_deploy_rollback($url) {
}
function drush_provision_drupal_provision_deploy($url) {
$url = drush_get_option('site_url');
_provision_drupal_maintain_aliases($url);
}
......@@ -96,5 +96,7 @@ function drush_provision_drupal_post_provision_deploy($url) {
drush_include_engine('drupal', 'deploy');
drush_set_option('packages', _scrub_object(provision_drupal_system_map()), 'site');
_provision_drupal_rebuild_caches();
drush_set_option('aliases', drush_get_option('aliases'), 'site');
drush_set_option('redirection', drush_get_option('redirection'), 'site');
}
}
......@@ -356,6 +356,7 @@ function _provision_drupal_get_cvs_versions($files) {
function _provision_drupal_maintain_aliases($url) {
if (PROVISION_CONTEXT_SITE) {
// First we delete all the old aliases
drush_set_option('aliases', drush_get_option('aliases'), 'site');
_provision_drupal_delete_aliases(drush_get_option('aliases', array(), 'site'));
if (!drush_get_option('redirection')) {
......
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