diff --git a/src/EventEnum.php b/src/EventEnum.php new file mode 100644 index 0000000..ba2d701 --- /dev/null +++ b/src/EventEnum.php @@ -0,0 +1,9 @@ +trigger(EventEnum::BEFORE_UP->value, $event); + + if (!$event->isValid) { + return ExitCode::UNSPECIFIED_ERROR; + } + $this->run('/setup/php-session-table'); $this->run('/setup/db-cache-table'); - // TODO: wrap with events if (Craft::$app->getIsInstalled()) { $this->run('/up'); + $this->run('/clear-caches/cloud-static-caches'); + } + + $event = new CancelableEvent(); + $this->trigger(EventEnum::AFTER_UP->value, $event); + + if (!$event->isValid) { + return ExitCode::UNSPECIFIED_ERROR; } return ExitCode::OK;