-
Notifications
You must be signed in to change notification settings - Fork 0
/
backlog
executable file
·35 lines (31 loc) · 1.01 KB
/
backlog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env php
<?php declare(strict_types=1);
/**
* This file is part of the backlog-velocity.
*
* (c) Yannick Voyer (http://github.com/yvoyer)
*/
namespace {
require_once 'vendor/autoload.php';
// todo move to infra namespace, make a symlink in bin on install
use Star\BacklogVelocity\Bundle\BacklogBundle\SymfonyPluginBridge;
use Star\BacklogVelocity\Cli\BacklogApplication;
use Symfony\Component\Console\Output\ConsoleOutput;
$output = new ConsoleOutput();
$path = __DIR__ . '/app/config/parameters.yml';
if (false === file_exists($path)) {
$message = <<<Message
<error>\n\n
Config file not present, you must copy the file '$path.template'
to a '$path' file at the root folder.
\n\n</error>
Message;
$output->writeln($message);
exit(1);
}
$env = 'dev';
$console = new BacklogApplication();
$kernel = new AppKernel($env, $env !== 'prod');
$console->registerPlugin(new SymfonyPluginBridge($kernel));
exit($console->run(null, $output));
}