-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathcastor.php
38 lines (30 loc) · 918 Bytes
/
castor.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
<?php
use Castor\Attribute\AsTask;
use function Castor\context;
use function Castor\import;
use function Castor\io;
use function Castor\mount;
use function Castor\run;
use function Castor\with;
import(__DIR__ . '/examples');
import(__DIR__ . '/tools/php-cs-fixer/castor.php');
import(__DIR__ . '/tools/phpstan/castor.php');
import(__DIR__ . '/tools/static/castor.php');
mount(__DIR__ . '/tools/phar');
mount(__DIR__ . '/tools/release');
mount(__DIR__ . '/tools/watcher');
#[AsTask(description: 'hello')]
function hello(): void
{
echo 'Hello world!';
}
#[AsTask(description: 'Update all dependencies')]
function update(): void
{
io()->title('Update all dependencies');
with(\castor\phar\update(...), context: context()->withWorkingDirectory(__DIR__ . '/tools/phar'));
\qa\cs\update();
\qa\phpstan\update();
io()->section('Update castor dependencies');
run(['composer', 'update']);
}