Commit 5743ea0f authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

add publish_path to the list of variables that need to be overridden, and use...

add publish_path to the list of variables that need to be overridden, and use a more sensible rollback mechanism.
parent e43c97d3
......@@ -12,6 +12,7 @@ function drush_provision_hostmaster_migrate_validate($site, $platform) {
// should be checked instead)
$data['root'] = $platform;
$data['r'] = $platform;
$data['publish_path'] = $platform;
drush_backend_invoke('provision verify', $data);
// verify the current platform
drush_backend_invoke('provision verify', array('root' => drush_get_option(array('r', 'root'), drush_locate_root())));
......@@ -21,7 +22,7 @@ function drush_provision_hostmaster_migrate_validate($site, $platform) {
function drush_provision_pre_hostmaster_migrate($site, $platform) {
if (!drush_confirm("This command will replace your crontab entry. continue?")) {
drush_set_error('PROVISION_CANCEL_MIGRATE', 'Cancelling');
return drush_set_error('PROVISION_CANCEL_MIGRATE', 'Cancelling');
}
// wipe out cron entry
exec('crontab -r');
......@@ -34,10 +35,6 @@ function drush_provision_hostmaster_migrate($site, $platform) {
drush_backend_invoke('provision clone', array($site, $site, $platform));
}
function drush_provision_hostmaster_migrate_rollback($site, $platform) {
drush_backend_invoke('provision delete ', array($site, 'root' => $platform));
}
function drush_provision_post_hostmaster_migrate($site, $platform) {
drush_backend_invoke('hostmaster unpark', array($site, 'uri' => $site, 'root' => $platform));
if (!drush_get_error()) {
......@@ -45,3 +42,9 @@ function drush_provision_post_hostmaster_migrate($site, $platform) {
drush_backend_invoke('provision verify', array($site, 'root' => $platform, 'publish_path' => $platform));
}
}
function drush_provision_post_hostmaster_migrate_rollback($site, $platform) {
drush_backend_invoke('provision delete', array($site, 'root' => $platform));
drush_backend_invoke('provision verify', array($site));
}
......@@ -166,7 +166,6 @@ function provision_drush_command() {
function drush_provision_hostmaster_make($platform) {
drush_backend_invoke('make', array(dirname(__FILE__) . '/aegir.make', $platform));
}
/**
......
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