-
Notifications
You must be signed in to change notification settings - Fork 1
/
.konstrui.php
executable file
·79 lines (74 loc) · 2.28 KB
/
.konstrui.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
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
77
78
79
<?php
$version = new Konstrui\Version();
return [
'tasks' => [
'composer' => [
'task' => new \Konstrui\Task\ComposerTask(),
'description' => 'Installs non-development composer dependencies.',
],
'composer-dev' => [
'task' => new \Konstrui\Task\ComposerTask(
\Konstrui\Task\ComposerTask::MODE_INSTALL,
true
),
'description' => 'Installs all composer dependencies (including dev).',
],
'tests' => [
'task' => new \Konstrui\Task\PhpUnitTask(),
'dependencies' => [
'composer-dev',
],
'description' => 'Runs unit and integration tests.',
],
'code-fixer' => [
'task' => new \Konstrui\Task\ExecutableTask(
'./vendor/bin/php-cs-fixer fix',
\Konstrui\Task\ExecutableTask::IGNORE_EXIT_CODE
),
'dependencies' => [
'composer-dev',
],
'description' => 'Runs PHP CS Fixer.',
],
'cleanup' => [
'task' => new \Konstrui\Task\CleanTask(
[
__DIR__ . '/code-coverage-report',
__DIR__ . '/cache',
__DIR__ . '/clover.xml',
]
),
'description' => 'Performs a cleanup after running tests.',
],
'phar' => [
'task' => new \Konstrui\Task\PharTask(
sprintf('konstrui-%s.phar', $version->getVersion()),
[
__DIR__ . '/src/',
__DIR__ . '/vendor/',
__DIR__ . '/autoload.php',
__DIR__ . '/runner.php',
],
__DIR__,
<<<STUB
#!/usr/bin/env php
<?php
Phar::mapPhar('konstrui-{$version->getVersion()}.phar');
require 'phar://konstrui-{$version->getVersion()}.phar/runner.php';
__HALT_COMPILER();
STUB
),
'dependencies' => [
'composer',
],
],
'quality' => [
'task' => new \Konstrui\Task\CompoundTask(
[
'code-fixer',
'tests',
]
),
],
],
];