forked from deployphp/deployer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcakephp.php
49 lines (41 loc) · 1009 Bytes
/
cakephp.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
<?php
namespace Deployer;
require_once __DIR__ . '/common.php';
add('recipes', ['cakephp']);
/**
* CakePHP 4 Project Template configuration
*/
// CakePHP 4 Project Template shared dirs
set('shared_dirs', [
'logs',
'tmp',
]);
// CakePHP 4 Project Template shared files
set('shared_files', [
'config/.env',
'config/app.php',
]);
/**
* Create plugins' symlinks
*/
task('deploy:init', function () {
run('{{release_or_current_path}}/bin/cake plugin assets symlink');
})->desc('Initialization');
/**
* Run migrations
*/
task('deploy:run_migrations', function () {
run('{{release_or_current_path}}/bin/cake migrations migrate');
run('{{release_or_current_path}}/bin/cake schema_cache clear');
run('{{release_or_current_path}}/bin/cake schema_cache build');
})->desc('Run migrations');
/**
* Main task
*/
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'deploy:init',
'deploy:run_migrations',
'deploy:publish',
])->desc('Deploy your project');