-
Notifications
You must be signed in to change notification settings - Fork 0
/
sws-caravan
executable file
·36 lines (32 loc) · 1.29 KB
/
sws-caravan
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
#!/usr/bin/env php
<?php
// 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';
} elseif (file_exists(__DIR__.'/../../autoload.php')) {
$autoloaderPath = __DIR__ . '/../../autoload.php';
} else {
die("Could not find autoloader. Run 'composer install'.");
}
}
$classLoader = require $autoloaderPath;
// Customization variables
$appName = "StanfordCaravan";
//$appVersion = trim(file_get_contents(__DIR__ . '/VERSION'));
$appVersion = 1.0;
$commandClasses = [ \StanfordCaravan\Robo\Tasks\RoboFile::class ];
$selfUpdateRepository = 'su-sws/stanford_circleci';
$configurationFilename = 'circleci.config.yml';
// Define our Runner, and pass it the command classes we provide.
$runner = new \Robo\Runner($commandClasses);
$runner->setSelfUpdateRepository($selfUpdateRepository)
->setConfigurationFilename($configurationFilename)
->setClassLoader($classLoader);
// Execute the command and return the result.
$output = new \Symfony\Component\Console\Output\ConsoleOutput();
$statusCode = $runner->execute($argv, $appName, $appVersion, $output);
exit($statusCode);