diff --git a/drush/provision_tasks_extra.drush.inc b/drush/provision_tasks_extra.drush.inc index 24e0698..c3137a5 100644 --- a/drush/provision_tasks_extra.drush.inc +++ b/drush/provision_tasks_extra.drush.inc @@ -27,6 +27,10 @@ function provision_tasks_extra_drush_command() { 'description' => dt('Runs db updates on a site'), 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, ); + $items['provision-upgrade'] = array( + 'description' => dt('Runs core and contrib upgrades on a site'), + 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, + ); $items['provision-flush_drush_cache'] = array( 'description' => 'Flushes the Drush cache on the server', 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, @@ -102,6 +106,15 @@ function drush_provision_tasks_extra_provision_update() { } /** + * Implements the provision-update command. + */ +function drush_provision_tasks_extra_provision_upgrade() { + drush_errors_on(); + provision_backend_invoke(d()->name, 'pm-update'); + drush_log(dt('Drush pm-update task completed')); +} + +/** * Implements drush_hook_COMMAND_pre_validate(). * * Make a backup of the site before we mess with it. diff --git a/hosting_tasks_extra.module b/hosting_tasks_extra.module index 3cbd01d..df7d8c2 100644 --- a/hosting_tasks_extra.module +++ b/hosting_tasks_extra.module @@ -33,6 +33,11 @@ function hosting_tasks_extra_hosting_tasks() { 'title' => t('Flush Drush cache'), 'description' => t('Flushes the Drush cache on this (web) server.'), ); + $tasks['site']['upgrade'] = array( + 'title' => t('Upgrade Drupal'), + 'description' => t('Upgrades drupal core and contrib to the latest versions.'), + 'dialog' => TRUE, + ); return $tasks; }