refactor(templates): update service template file handling to use dynamic file name from constants

This commit is contained in:
Andras Bacsai
2025-08-10 10:10:14 +02:00
parent 936a192236
commit 39f25573bf
7 changed files with 19 additions and 15 deletions

View File

@@ -16,7 +16,7 @@ class Services extends Command
/**
* {@inheritdoc}
*/
protected $description = 'Generate service-templates.yaml based on /templates/compose directory';
protected $description = 'Generates service-templates json file based on /templates/compose directory';
public function handle(): int
{
@@ -33,7 +33,7 @@ class Services extends Command
];
})->toJson(JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
file_put_contents(base_path('templates/service-templates.json'), $serviceTemplatesJson.PHP_EOL);
file_put_contents(base_path('templates/'.config('constants.services.file_name')), $serviceTemplatesJson.PHP_EOL);
return self::SUCCESS;
}