From 46747d2bf8e859d80d08762c6e580eaa81158d21 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 21 Feb 2023 08:32:19 +0000 Subject: [PATCH] feat: allow for disabling a justfile Prevent generating a justfile by adding `justfile: false` to the project's build.yaml file. Refs: #18 --- src/Console/Command/BuildConfigurationCommand.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Console/Command/BuildConfigurationCommand.php b/src/Console/Command/BuildConfigurationCommand.php index d2dcd26..4b557df 100644 --- a/src/Console/Command/BuildConfigurationCommand.php +++ b/src/Console/Command/BuildConfigurationCommand.php @@ -87,6 +87,9 @@ final class BuildConfigurationCommand extends Command 'dockerfile' => new Assert\Optional(), + // TODO: this should be a boolean if present. + 'justfile' => new Assert\Optional(), + 'php' => new Assert\Optional(), 'web' => new Assert\Optional(), @@ -115,7 +118,10 @@ final class BuildConfigurationCommand extends Command $this->filesToGenerate->push(['env.example', '.env.example']); $this->filesToGenerate->push(['Dockerfile', 'Dockerfile']); - $this->filesToGenerate->push(['justfile', 'justfile']); + + if (false !== Arr::get($configurationData, "justfile", true)) { + $this->filesToGenerate->push(['justfile', 'justfile']); + } if (isset($configurationData['dockerCompose']) && $configurationData['dockerCompose'] !== null) { $this->filesToGenerate->push(['docker-compose.yaml', 'docker-compose.yaml']);