forked from deployphp/deployer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sulu.php
33 lines (23 loc) · 860 Bytes
/
sulu.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
<?php
namespace Deployer;
require_once __DIR__ . '/symfony.php';
add('recipes', ['sulu']);
add('shared_dirs', ['var/indexes', 'var/sitemaps', 'var/uploads', 'public/uploads']);
add('writable_dirs', ['public/uploads']);
set('bin/websiteconsole', function () {
return parse('{{bin/php}} {{release_path}}/bin/websiteconsole --no-interaction');
});
desc('Migrate PHPCR');
task('phpcr:migrate', function () {
run('{{bin/console}} phpcr:migrations:migrate');
});
desc('Clear cache');
task('deploy:website:cache:clear', function () {
run('{{bin/websiteconsole}} cache:clear --no-warmup');
});
desc('Warm up cache');
task('deploy:website:cache:warmup', function () {
run('{{bin/websiteconsole}} cache:warmup');
});
after('deploy:cache:clear', 'deploy:website:cache:clear');
after('deploy:website:cache:clear', 'deploy:website:cache:warmup');