@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | set('log_files', 'writable/logs/*.log'); |
25 | 25 | |
26 | -set('codeigniter4_version', function () { |
|
26 | +set('codeigniter4_version', function() { |
|
27 | 27 | $result = run('{{bin/php}} {{release_or_current_path}}/spark'); |
28 | 28 | preg_match_all('/(\d+\.?)+/', $result, $matches); |
29 | 29 | return $matches[0][0] ?? 5.5; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | function spark($command, $options = []) |
47 | 47 | { |
48 | - return function () use ($command, $options) { |
|
48 | + return function() use ($command, $options) { |
|
49 | 49 | |
50 | 50 | // Ensure the spark command is available on the current version. |
51 | 51 | $versionTooEarly = array_key_exists('min', $options) |
@@ -12,7 +12,7 @@ |
||
12 | 12 | 'storage/statamic', |
13 | 13 | ]); |
14 | 14 | |
15 | -set('statamic_version', function () { |
|
15 | +set('statamic_version', function() { |
|
16 | 16 | $result = run('{{bin/php}} {{release_or_current_path}}/please --version'); |
17 | 17 | preg_match_all('/(\d+\.?)+/', $result, $matches); |
18 | 18 | return $matches[0][0] ?? 'unknown'; |
@@ -24,14 +24,14 @@ |
||
24 | 24 | /** |
25 | 25 | * Create plugins' symlinks |
26 | 26 | */ |
27 | -task('deploy:init', function () { |
|
27 | +task('deploy:init', function() { |
|
28 | 28 | run('{{bin/php}} {{release_or_current_path}}/bin/cake.php plugin assets symlink'); |
29 | 29 | })->desc('Initialization'); |
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Run migrations |
33 | 33 | */ |
34 | -task('deploy:run_migrations', function () { |
|
34 | +task('deploy:run_migrations', function() { |
|
35 | 35 | run('{{bin/php}} {{release_or_current_path}}/bin/cake.php migrations migrate --no-lock'); |
36 | 36 | run('{{bin/php}} {{release_or_current_path}}/bin/cake.php schema_cache build'); |
37 | 37 | })->desc('Run migrations'); |
@@ -22,14 +22,14 @@ |
||
22 | 22 | * Clear cache |
23 | 23 | */ |
24 | 24 | desc('Clears cache'); |
25 | -task('deploy:cache:clear', function () { |
|
25 | +task('deploy:cache:clear', function() { |
|
26 | 26 | run("cd {{release_or_current_path}} && php -r \"require_once 'app/Mage.php'; umask(0); Mage::app()->cleanCache();\""); |
27 | 27 | }); |
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Remove files that can be used to compromise Magento |
31 | 31 | */ |
32 | -task('deploy:clear_version', function () { |
|
32 | +task('deploy:clear_version', function() { |
|
33 | 33 | run("rm -f {{release_or_current_path}}/LICENSE.html"); |
34 | 34 | run("rm -f {{release_or_current_path}}/LICENSE.txt"); |
35 | 35 | run("rm -f {{release_or_current_path}}/LICENSE_AFL.txt"); |
@@ -9,22 +9,22 @@ |
||
9 | 9 | |
10 | 10 | add('writable_dirs', ['public/uploads']); |
11 | 11 | |
12 | -set('bin/websiteconsole', function () { |
|
12 | +set('bin/websiteconsole', function() { |
|
13 | 13 | return parse('{{bin/php}} {{release_or_current_path}}/bin/websiteconsole --no-interaction'); |
14 | 14 | }); |
15 | 15 | |
16 | 16 | desc('Migrates PHPCR'); |
17 | -task('phpcr:migrate', function () { |
|
17 | +task('phpcr:migrate', function() { |
|
18 | 18 | run('{{bin/console}} phpcr:migrations:migrate'); |
19 | 19 | }); |
20 | 20 | |
21 | 21 | desc('Clears cache'); |
22 | -task('deploy:website:cache:clear', function () { |
|
22 | +task('deploy:website:cache:clear', function() { |
|
23 | 23 | run('{{bin/websiteconsole}} cache:clear --no-warmup'); |
24 | 24 | }); |
25 | 25 | |
26 | 26 | desc('Warmups cache'); |
27 | -task('deploy:website:cache:warmup', function () { |
|
27 | +task('deploy:website:cache:warmup', function() { |
|
28 | 28 | run('{{bin/websiteconsole}} cache:warmup'); |
29 | 29 | }); |
30 | 30 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | set('writable_dirs', ['runtime']); |
13 | 13 | |
14 | 14 | desc('Runs Yii2 migrations for your project'); |
15 | -task('deploy:migrate', function () { |
|
15 | +task('deploy:migrate', function() { |
|
16 | 16 | run('cd {{release_or_current_path}} && {{bin/php}} yii migrate --interactive=0'); |
17 | 17 | }); |
18 | 18 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * Apply database migrations |
23 | 23 | */ |
24 | 24 | desc('Applies database migrations'); |
25 | -task('deploy:run_migrations', function () { |
|
25 | +task('deploy:run_migrations', function() { |
|
26 | 26 | run('FLOW_CONTEXT={{flow_context}} {{bin/php}} {{release_or_current_path}}/{{flow_command}} doctrine:migrate'); |
27 | 27 | }); |
28 | 28 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * Publish resources |
31 | 31 | */ |
32 | 32 | desc('Publishes resources'); |
33 | -task('deploy:publish_resources', function () { |
|
33 | +task('deploy:publish_resources', function() { |
|
34 | 34 | run('FLOW_CONTEXT={{flow_context}} {{bin/php}} {{release_or_current_path}}/{{flow_command}} resource:publish'); |
35 | 35 | }); |
36 | 36 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | set('cleanup_use_sudo', false); |
6 | 6 | |
7 | 7 | desc('Cleanup old releases'); |
8 | -task('deploy:cleanup', function () { |
|
8 | +task('deploy:cleanup', function() { |
|
9 | 9 | $releases = get('releases_list'); |
10 | 10 | $keep = get('keep_releases'); |
11 | 11 | $sudo = get('cleanup_use_sudo') ? 'sudo' : ''; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | set('copy_dirs', []); |
7 | 7 | |
8 | 8 | desc('Copies directories'); |
9 | -task('deploy:copy_dirs', function () { |
|
9 | +task('deploy:copy_dirs', function() { |
|
10 | 10 | if (has('previous_release')) { |
11 | 11 | foreach (get('copy_dirs') as $dir) { |
12 | 12 | // Make sure all path without tailing slash. |