mirror of
https://github.com/opdavies/build-configs.git
synced 2025-09-06 11:25:33 +01:00
Initial Sculpin support
* Add Sculpin as a project type * Declare initial files to generate * Add flake.nix.twig * Add .gitignore.twig * Add run.twig
This commit is contained in:
parent
7bab7e91f4
commit
f98a69e21f
6 changed files with 91 additions and 1 deletions
|
@ -25,6 +25,17 @@ final class CreateListOfFilesToGenerate
|
|||
$filesToGenerate = collect();
|
||||
|
||||
switch (strtolower($configDto->type)) {
|
||||
case (strtolower(ProjectType::Sculpin->name)):
|
||||
$filesToGenerate = collect([
|
||||
new TemplateFile(data: 'php/sculpin/.gitignore', name: '.gitignore'),
|
||||
new TemplateFile(data: 'php/sculpin/run', name: 'run'),
|
||||
]);
|
||||
|
||||
if ($configDto->isFlake) {
|
||||
$filesToGenerate->push(new TemplateFile(data: 'php/sculpin/flake.nix', name: 'flake.nix'));
|
||||
}
|
||||
break;
|
||||
|
||||
case (strtolower(ProjectType::Fractal->name)):
|
||||
$filesToGenerate = collect([
|
||||
new TemplateFile(data: 'fractal/.gitignore', name: '.gitignore'),
|
||||
|
|
|
@ -243,7 +243,7 @@ final class ConfigDto
|
|||
#[Assert\Type('string')]
|
||||
public string $projectRoot;
|
||||
|
||||
#[Assert\Choice(choices: ['drupal', 'fractal', 'laravel', 'php-library', 'symfony', 'terraform'])]
|
||||
#[Assert\Choice(choices: ['drupal', 'fractal', 'laravel', 'php-library', 'sculpin', 'symfony', 'terraform'])]
|
||||
public string $type;
|
||||
|
||||
#[Assert\Collection([
|
||||
|
|
|
@ -10,6 +10,7 @@ enum ProjectType: string
|
|||
case Fractal = 'fractal';
|
||||
case Laravel = 'laravel';
|
||||
case PHPLibrary = 'php-library';
|
||||
case Sculpin = 'sculpin';
|
||||
case Symfony = 'symfony';
|
||||
case Terraform = 'terraform';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue