diff --git a/src/DeployRunner.php b/src/DeployRunner.php index 1617ff5..aa0fda3 100644 --- a/src/DeployRunner.php +++ b/src/DeployRunner.php @@ -148,24 +148,15 @@ private function initializeConfigurableTask(ConfigurableTaskInterface $task, Con foreach ($configurations as $taskConfig) { if ($task->supports($taskConfig)) { - $task = $task->configureWithTaskConfig($taskConfig); + $deployerTask = $task->configureWithTaskConfig($taskConfig); - if ($task && $taskConfig instanceof ServerRoleConfigurableInterface) { - $this->configureTaskOnServerRoles($task, $taskConfig); - } - - if ($task && $taskConfig instanceof StageConfigurableInterface) { - $this->configureTaskOnStage($task, $taskConfig); + if ($deployerTask && $taskConfig instanceof StageConfigurableInterface) { + $this->configureTaskOnStage($deployerTask, $taskConfig); } } } } - private function configureTaskOnServerRoles(Task $task, ServerRoleConfigurableInterface $taskConfiguration) - { - $task->select('role=' . implode(',role=', $taskConfiguration->getServerRoles())); - } - private function configureTaskOnStage(Task $task, StageConfigurableInterface $taskConfiguration) { if (!$taskConfiguration->getStage()) {