feat: allow for disabling a justfile

Prevent generating a justfile by adding `justfile: false` to the
project's build.yaml file.

Refs: #18
This commit is contained in:
Oliver Davies 2023-02-21 08:32:19 +00:00
parent fa1774b550
commit 46747d2bf8

View file

@ -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']);