From 7bfbaaa77e32fa30f0c83a66ea43ea22679f38ff Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Wed, 13 Aug 2025 12:05:49 +0200 Subject: [PATCH 1/3] Add 'tree' command to Hypernode Deploy to get overview and list of tasks for a stage --- src/Command/Tree.php | 40 ++++++++++++++++++++++++++++++++++++++++ src/DeployRunner.php | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/Command/Tree.php diff --git a/src/Command/Tree.php b/src/Command/Tree.php new file mode 100644 index 0000000..4e0bc6f --- /dev/null +++ b/src/Command/Tree.php @@ -0,0 +1,40 @@ +deployRunner = $deployRunner; + } + + protected function execute(Input $input, Output $output): int + { + try { + $this->deployRunner->prepare(true, true, $input->getArgument('task'), false); + } catch (InvalidConfigurationException | ValidationException $e) { + $output->write($e->getMessage()); + return 1; + } + $result = parent::execute($input, $output); + + return $result; + } +} diff --git a/src/DeployRunner.php b/src/DeployRunner.php index e9c7692..3688ae8 100644 --- a/src/DeployRunner.php +++ b/src/DeployRunner.php @@ -104,7 +104,7 @@ public function run( * @throws InvalidConfigurationException * @throws Throwable */ - private function prepare( + public function prepare( bool $configureBuildStage, bool $configureServers, string $stage, From 253c6835e7533de0f4accef8a1f04052da5022df Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 13 Aug 2025 15:14:58 +0200 Subject: [PATCH 2/3] Update src/Command/Tree.php Co-authored-by: Timon de Groot --- src/Command/Tree.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Command/Tree.php b/src/Command/Tree.php index 4e0bc6f..0a42772 100644 --- a/src/Command/Tree.php +++ b/src/Command/Tree.php @@ -1,5 +1,8 @@ Date: Wed, 13 Aug 2025 15:15:48 +0200 Subject: [PATCH 3/3] Remove single newline for formatting --- src/Command/Tree.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Command/Tree.php b/src/Command/Tree.php index 0a42772..f3cb121 100644 --- a/src/Command/Tree.php +++ b/src/Command/Tree.php @@ -2,7 +2,6 @@ declare(strict_types=1); - namespace Hypernode\Deploy\Command; use Deployer\Deployer;