Commit 390760da authored by Adrian Rossouw's avatar Adrian Rossouw

Hostmaster migrate / install should exit if drush make fails - #683926

parent 5a51e471
......@@ -53,6 +53,11 @@ function drush_provision_hostmaster_install($site = NULL) {
));
provision_backend_invoke($server, 'provision-verify');
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
if (drush_get_option('backend-only')) {
return;
}
......@@ -67,6 +72,12 @@ function drush_provision_hostmaster_install($site = NULL) {
));
provision_backend_invoke($platform_name, 'provision-verify');
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
if (!drush_get_option('client_email')) {
$client_email = drush_prompt(dt("Admin user e-mail"), "webmaster@localhost");
}
......@@ -87,6 +98,12 @@ function drush_provision_hostmaster_install($site = NULL) {
$data = provision_backend_invoke($site_name, 'provision-install');
provision_backend_invoke($site_name, 'provision-verify');
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
drush_print("Initializing the hosting system");
provision_backend_invoke($site_name, 'hosting-setup');
......
......@@ -23,7 +23,12 @@ function drush_provision_hostmaster_migrate_validate($site, $platform) {
provision_backend_invoke($server, 'provision-verify');
drush_set_option('server_name', $server);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
$old_platform = '@platform_' . preg_replace("/[!\W]/", "", basename(rtrim($data['publish_path'], '/')));
drush_backend_invoke_args("provision-save", array($old_platform), array(
'context_type' => 'platform',
......@@ -33,6 +38,11 @@ function drush_provision_hostmaster_migrate_validate($site, $platform) {
));
provision_backend_invoke($old_platform, 'provision-verify');
drush_set_option('old_platform', $old_platform);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
$new_platform = '@platform_' . preg_replace("/[!\W]/", "", basename(rtrim($platform, '/')));
drush_backend_invoke_args("provision-save", array($new_platform), array(
......@@ -44,6 +54,11 @@ function drush_provision_hostmaster_migrate_validate($site, $platform) {
));
provision_backend_invoke($new_platform, 'provision-verify');
drush_set_option('new_platform', $new_platform);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
$site_name = '@hostmaster';
drush_backend_invoke_args("provision-save", array($site_name), array(
......@@ -55,6 +70,12 @@ function drush_provision_hostmaster_migrate_validate($site, $platform) {
));
provision_backend_invoke($site_name, 'provision-verify');
drush_set_option('site_name', $site_name);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
}
......
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