-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.php
More file actions
executable file
·33 lines (29 loc) · 879 Bytes
/
init.php
File metadata and controls
executable file
·33 lines (29 loc) · 879 Bytes
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
<?php
const APP_NAME = "SiteSync";
const APP_VERSION = '0.3.0';
// If we're running from phar load the phar autoload file.
$pharPath = \Phar::running(true);
if ($pharPath) {
$autoloaderPath = "$pharPath/vendor/autoload.php";
} else {
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
$autoloaderPath = __DIR__ . '/vendor/autoload.php';
} else {
die("Could not find autoloader. Run 'composer install'.");
}
}
$classLoader = require_once $autoloaderPath;
$commandClasses = [
\RoboSiteSync\Commands\SiteCmd::class,
\RoboSiteSync\Commands\PairCmd::class,
\RoboSiteSync\Commands\SyncCmd::class,
];
$statusCode = (new \Robo\Runner($commandClasses))
->setClassLoader($classLoader)
->execute(
$argv,
APP_NAME,
APP_VERSION,
new \Symfony\Component\Console\Output\ConsoleOutput()
);
exit($statusCode);