build-configs/bin/build-configs.php

22 lines
581 B
PHP
Raw Normal View History

2023-01-19 17:25:51 +00:00
<?php
2023-01-21 20:42:52 +00:00
use OliverDaviesLtd\BuildConfigs\Console\Command\BuildConfigurationCommand;
2023-01-19 17:25:51 +00:00
use Symfony\Component\Console\Application;
2023-01-19 18:53:42 +00:00
use Symfony\Component\Filesystem\Filesystem;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
2023-01-19 17:25:51 +00:00
2023-01-19 20:10:04 +00:00
require __DIR__ . '/../vendor/autoload.php';
2023-01-19 17:25:51 +00:00
2023-01-19 18:53:42 +00:00
$filesystem = new Filesystem();
2023-01-19 20:10:04 +00:00
$twig = new Environment(new FilesystemLoader([__DIR__.'/../templates']));
2023-01-19 18:53:42 +00:00
$application = new Application();
$application->addCommands([
new BuildConfigurationCommand($twig, $filesystem),
]);
2023-01-21 20:42:52 +00:00
$application->setDefaultCommand('build-configs', true);
2023-01-19 18:53:42 +00:00
$application->run();