From fdde33e2e2ee1d3f0f9f622d725bb06b5211f471 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Sun, 16 Jul 2017 23:40:55 +0700 Subject: [PATCH] Fixed 'setup', 'test' and 'deploy' stages. Now if 'setup' or 'test' is failed then next stages will skip. --- src/PHPCensor/Builder.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PHPCensor/Builder.php b/src/PHPCensor/Builder.php index 7ac1ec10..cf1d195c 100644 --- a/src/PHPCensor/Builder.php +++ b/src/PHPCensor/Builder.php @@ -205,6 +205,9 @@ class Builder implements LoggerAwareInterface // Run the core plugin stages: foreach ([Build::STAGE_SETUP, Build::STAGE_TEST, Build::STAGE_DEPLOY] as $stage) { $success &= $this->pluginExecutor->executePlugins($this->config, $stage); + if (!$success) { + break; + } } // Set the status so this can be used by complete, success and failure @@ -215,7 +218,6 @@ class Builder implements LoggerAwareInterface $this->build->setStatus(Build::STATUS_FAILED); } - if ($success) { $this->pluginExecutor->executePlugins($this->config, Build::STAGE_SUCCESS);