diff --git a/targets/mediawiki/MediaWikiTarget.php b/targets/mediawiki/MediaWikiTarget.php index 044c526..887cf91 100644 --- a/targets/mediawiki/MediaWikiTarget.php +++ b/targets/mediawiki/MediaWikiTarget.php @@ -38,7 +38,9 @@ public function install(): void { ->setDumpFile(__DIR__.'/mw_bench.sql.gz') ->installDatabase(); - $cache_dir = $this->options->tempDir.'/mw-cache'; + // Put it inside the source root so that if we're generating PHP files and + // we're in repo-auth mode, the generated files end up in the repo + $cache_dir = $this->getSourceRoot().'/mw-cache'; mkdir($cache_dir); file_put_contents( @@ -55,6 +57,15 @@ public function install(): void { ); } + <<__Override>> + public function postInstall(): void { + Utils::RunCommand(Vector { + PHP_BINARY, + $this->getSourceRoot().'/maintenance/rebuildLocalisationCache.php', + '--lang=en', + }); + } + public function getSourceRoot(): string { return $this->options->tempDir.'/mediawiki'; }