This repository has been archived by the owner on Jul 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
artisan
76 lines (65 loc) · 2 KB
/
artisan
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env php
<?php
$fromPackage = __DIR__."/../../autoload.php";
if (file_exists($fromPackage)) {
require_once $fromPackage;
} else {
require_once "./vendor/autoload.php";
}
use Illuminate\Config\Repository;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| First we need to get an application instance. This creates an instance
| of the application / container and bootstraps the application so it
| is ready to receive HTTP / Console requests from the environment.
|
*/
function base_path()
{
return getcwd();
}
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$app = new Moon\Artisan\Stub\Application;
$app->singleton(
'Illuminate\Contracts\Debug\ExceptionHandler',
'Moon\\Artisan\Exceptions\Handler'
);
app()->instance('path', realpath('./src'));
app()->instance('basePath', getcwd());
app()->instance('path.base', getcwd());
$kernel = new Moon\Artisan\Console\Kernel(
$app,
new Moon\Artisan\Stub\Dispatcher()
);
app()->instance('config', $config = new Repository([
'hooks.enabled' => 1,
'hooks.commit-msg' => [
],
'hooks.prepare-commit-msg' => [
'php artisan hooks:semantic-commits'
],
'hooks.pre-commit' => [
'php artisan hooks:phpcs --diff --proxiedArguments="-p -n -s"'
],
'hooks.pre-push' => [
'./vendor/bin/phpunit'
],
'hooks.post-checkout' => [
'php artisan hooks:install-deps'
]
]));
exit($kernel->handle(new ArgvInput, new ConsoleOutput));