build-configs/bin/build-configs

26 lines
835 B
PHP
Executable file

#!/usr/bin/env php
<?php
use OliverDaviesLtd\BuildConfigs\Console\Command\BuildConfigurationCommand;
use OliverDaviesLtd\BuildConfigs\Validator\ConfigurationValidator;
use Symfony\Component\Console\Application;
use Symfony\Component\Filesystem\Filesystem;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
require __DIR__ . '/../vendor/autoload.php';
$filesystem = new Filesystem();
$twig = new Environment(new FilesystemLoader([__DIR__.'/../templates']));
$configurationValidator = new ConfigurationValidator();
$application = new Application();
$command = new BuildConfigurationCommand($twig, $filesystem, $configurationValidator);
$application->addCommands([
new BuildConfigurationCommand($twig, $filesystem, $configurationValidator),
]);
$application->setDefaultCommand('build-configs', true);
$application->run();