diff --git a/scripts/update-tester.php b/scripts/update-tester.php index 21064b9..117dc63 100755 --- a/scripts/update-tester.php +++ b/scripts/update-tester.php @@ -177,14 +177,20 @@ public function testUpdate( } $updatePackages->run(); + $absoluteDestinationDocroot = DocrootResolver::getDocroot($absoluteDestination); + + // Run "drush cr" before updating code. + $drushCmd = $this->task(Drush::class); + $drushCmd->dir($absoluteDestinationDocroot); + $drushCmd->arg('cache-rebuild'); + $drushCmd->run(); + /** @var \Robo\Task\Composer\Update $composerUpdate */ $composerUpdate = $this->task(Update::class); $composerUpdate->dir($absoluteDestination); $composerUpdate->option('no-interaction')->option('no-dev'); $composerUpdate->run(); - $absoluteDestinationDocroot = DocrootResolver::getDocroot($absoluteDestination); - /** @var \Thunder\UpdateTester\Exec\Drush $drushCmd */ $drushCmd = $this->task(Drush::class); $drushCmd->dir($absoluteDestinationDocroot);