mirror of
https://github.com/opdavies/build-configs.git
synced 2025-09-06 03:15:34 +01:00
feat: add project_root
setting
Allow for overriding the project root from `/app` to something else, such as `/var/www/html`. The default is set within a new `build.defaults.yaml` file which the project specific file is merged into. Fixes #27
This commit is contained in:
parent
eeeb70df14
commit
6b5c1b5aee
8 changed files with 19 additions and 10 deletions
|
@ -55,7 +55,10 @@ final class BuildConfigurationCommand extends Command
|
|||
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$configurationData = Yaml::parseFile($configFile);
|
||||
$configurationData = array_merge(
|
||||
Yaml::parseFile(__DIR__.'/../../../resources/build.defaults.yaml'),
|
||||
Yaml::parseFile($configFile),
|
||||
);
|
||||
|
||||
$violations = $this->configurationValidator->validate($configurationData);
|
||||
|
||||
|
|
|
@ -37,6 +37,11 @@ final class ConfigurationValidator implements ValidatorInterface
|
|||
new Assert\Choice(['drupal-project', 'php-library']),
|
||||
],
|
||||
|
||||
'project_root' => [
|
||||
new Assert\NotNull(),
|
||||
new Assert\Type('string'),
|
||||
],
|
||||
|
||||
'database' => new Assert\Optional(),
|
||||
|
||||
'drupal' => new Assert\Optional(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue