forked from certificationy/certificationy-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcertificationy.php
37 lines (28 loc) · 1022 Bytes
/
certificationy.php
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
36
37
#!/usr/bin/env php
<?php
/*
* This file is part of the Certificationy CLI application.
*
* (c) Vincent Composieux <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require __DIR__ . '/vendor/autoload.php';
use Certificationy\Cli\Command\StartCommand;
use KevinGH\Amend\Command;
use KevinGH\Amend\Helper;
use Symfony\Component\Console\Application;
use Symfony\Component\Yaml\Yaml;
const VERSION = 1.4;
const APPLICATION_NAME = 'Certificationy';
$application = new Application(APPLICATION_NAME, VERSION);
$config = Yaml::parse(file_get_contents('config.yml'));
$updateCommand = new Command('self-update');
$updateCommand->setManifestUri($config['manifest_uri']);
$application->add($updateCommand);
$application->getHelperSet()->set(new Helper());
$startCommand = new StartCommand();
$application->add($startCommand);
$application->setDefaultCommand($startCommand->getName());
$application->run();