From 7285001954fdfde42def875835351152955596e6 Mon Sep 17 00:00:00 2001 From: Vlad Byndych Date: Thu, 10 Aug 2023 19:00:18 +0200 Subject: [PATCH] fix: made script which can create required directories, container and warmup application cache, so we can initialize applicaton without installing or updating it. --- scripts/taoInit.php | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 scripts/taoInit.php diff --git a/scripts/taoInit.php b/scripts/taoInit.php new file mode 100644 index 0000000000..e226cb4c74 --- /dev/null +++ b/scripts/taoInit.php @@ -0,0 +1,47 @@ +get(SetupFileCache::class)->createDirectory(GENERIS_CACHE_PATH); +$report->add(Report::createSuccess('Init filesystem complete.')); + +$actionList = [ + tools\ContainerCacheWarmup::class => [], + tools\ApplicationCacheWarmup::class => [], +]; + +$cliController = new CliController(); +$cliController->setServiceLocator($serviceManager); + +foreach ($actionList as $actionIdentifier => $actionParams) { + $report->add($cliController->runAction($actionIdentifier, $actionParams)); +} + +echo helpers_Report::renderToCommandline($report);