Commit a7311d9e authored by omega8cc's avatar omega8cc

Detect if the platform stays the same only when site name changes.

Otherwise it is obvious that the target platform must be different if we run Migrate task.
parent 82f36196
......@@ -32,18 +32,20 @@ function drush_provision_drupal_pre_provision_migrate($platform, $new_name = NUL
// If we are renaming the site, pick this up early.
if (!is_null($new_name) && ($new_name != d()->name)) {
drush_set_option('target_name', $new_name);
}
else {
// the site url stays the same
drush_set_option('target_name', d()->name);
drush_set_option('source_name', d()->uri);
// The platform stays the same
// Detect if the platform stays the same.
if (d()->platform->name == $platform) {
drush_log('Replacing the existing site on the same platform');
// deploying over existing site.
drush_set_option('deploy_replace_site', TRUE);
}
}
else {
// The site url stays the same, so the target platform
// must be different if we run Migrate task, right?
drush_set_option('target_name', d()->name);
}
}
/**
......
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