diff --git a/scripts/blt/drush/cache.php b/scripts/blt/drush/cache.php new file mode 100644 index 0000000000..41995aacc2 --- /dev/null +++ b/scripts/blt/drush/cache.php @@ -0,0 +1,29 @@ +taskDrush() ->stopOnFail() - // Sometimes drush forgets where to find its aliases. - ->drush("cc")->arg('drush') - // Rebuild caches in case service definitions have changed. - // @see https://www.drupal.org/node/2826466 - ->drush("cache-rebuild") // Execute db updates. // This must happen before features are imported or configuration is // imported. For instance, if you add a dependency on a new extension to diff --git a/src/Update/Updates.php b/src/Update/Updates.php index b90eaba287..e2205a0bc5 100644 --- a/src/Update/Updates.php +++ b/src/Update/Updates.php @@ -564,7 +564,7 @@ public function update_9001000() { // Update composer.json to include new BLT required/suggested files. // Pulls in wikimedia/composer-merge-plugin and composer/installers settings. $project_composer_json = $this->updater->getRepoRoot() . '/composer.json'; - $template_composer_json = $this->updater->getBltRoot() . '/subtree-splits/blt-project/composer.json'; + $template_composer_json = $this->updater->getBltRoot() . '/template/composer.json'; $munged_json = ComposerMunge::mungeFiles($project_composer_json, $template_composer_json); $bytes = file_put_contents($project_composer_json, $munged_json); if (!$bytes) { @@ -606,6 +606,28 @@ public function update_9001001() { $this->updater->getOutput()->writeln(""); } + /** + * 9.2.0. + * + * @Update( + * version = "9002000", + * description = "Factory Hooks Drush 9 bug fixes and enhancements." + * ) + */ + public function update_9002000() { + if (file_exists($this->updater->getRepoRoot() . '/factory-hooks')) { + $messages = [ + "This update will update the files in your existing factory hooks directory.", + "Review the resulting files and ensure that any customizations have been re-added.", + ]; + $this->updater->executeCommand("./vendor/bin/blt recipes:acsf:init:hooks"); + } + $formattedBlock = $this->updater->getFormatter()->formatBlock($messages, 'ice'); + $this->updater->getOutput()->writeln(""); + $this->updater->getOutput()->writeln($formattedBlock); + $this->updater->getOutput()->writeln(""); + } + /** * 10.0.0. * @@ -632,7 +654,6 @@ public function update_10000000() { $composer_json[$sync_composer_key] = ArrayManipulator::arrayMergeRecursiveDistinct( $composer_json[$sync_composer_key], $template_composer_json[$sync_composer_key]); } $composer_json['require-dev']['acquia/blt-require-dev'] = $template_composer_json['require']['acquia/blt-require-dev']; - $this->updater->writeComposerJson($composer_json); $messages = [ "Your composer.json file has been modified to remove the Composer merge plugin.",