@@ -5,7 +5,7 @@ |
||
| 5 | 5 | // And applies to current_path. Push can be done many times. |
| 6 | 6 | // The task purpose to be used only for development. |
| 7 | 7 | desc('Pushes local changes to remote host'); |
| 8 | -task('push', function () { |
|
| 8 | +task('push', function() { |
|
| 9 | 9 | $files = explode("\n", runLocally("git diff --name-only HEAD")); |
| 10 | 10 | |
| 11 | 11 | info('uploading:'); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | option('branch', null, InputOption::VALUE_REQUIRED, 'Branch to deploy'); |
| 16 | 16 | |
| 17 | 17 | // The deploy target: a branch, a tag or a revision. |
| 18 | -set('target', function () { |
|
| 18 | +set('target', function() { |
|
| 19 | 19 | $target = ''; |
| 20 | 20 | |
| 21 | 21 | $branch = get('branch'); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * Update code at {{release_path}} on host. |
| 69 | 69 | */ |
| 70 | 70 | desc('Updates code'); |
| 71 | -task('deploy:update_code', function () { |
|
| 71 | +task('deploy:update_code', function() { |
|
| 72 | 72 | $git = get('bin/git'); |
| 73 | 73 | $repository = get('repository'); |
| 74 | 74 | $target = get('target'); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * ``` |
| 17 | 17 | * ::: |
| 18 | 18 | */ |
| 19 | -set('rollback_candidate', function () { |
|
| 19 | +set('rollback_candidate', function() { |
|
| 20 | 20 | $currentRelease = basename(run('readlink {{current_path}}')); |
| 21 | 21 | $releases = get('releases_list'); |
| 22 | 22 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * ``` |
| 60 | 60 | * ::: |
| 61 | 61 | */ |
| 62 | -task('rollback', function () { |
|
| 62 | +task('rollback', function() { |
|
| 63 | 63 | cd('{{deploy_path}}'); |
| 64 | 64 | |
| 65 | 65 | $currentRelease = basename(run('readlink {{current_path}}')); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | set('shared_files', []); |
| 20 | 20 | |
| 21 | 21 | desc('Creates symlinks for shared files and dirs'); |
| 22 | -task('deploy:shared', function () { |
|
| 22 | +task('deploy:shared', function() { |
|
| 23 | 23 | $sharedPath = "{{deploy_path}}/shared"; |
| 24 | 24 | |
| 25 | 25 | // Validate shared_dir, find duplicates |
@@ -6,22 +6,22 @@ discard block |
||
| 6 | 6 | use function Deployer\Support\escape_shell_argument; |
| 7 | 7 | |
| 8 | 8 | // The name of the release. |
| 9 | -set('release_name', function () { |
|
| 10 | - return within('{{deploy_path}}', function () { |
|
| 9 | +set('release_name', function() { |
|
| 10 | + return within('{{deploy_path}}', function() { |
|
| 11 | 11 | $latest = run('cat .dep/latest_release || echo 0'); |
| 12 | 12 | return strval(intval($latest) + 1); |
| 13 | 13 | }); |
| 14 | 14 | }); |
| 15 | 15 | |
| 16 | 16 | // Holds releases log from `.dep/releases_log` file. |
| 17 | -set('releases_log', function () { |
|
| 17 | +set('releases_log', function() { |
|
| 18 | 18 | cd('{{deploy_path}}'); |
| 19 | 19 | |
| 20 | 20 | if (!test('[ -f .dep/releases_log ]')) { |
| 21 | 21 | return []; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - $releaseLogs = array_map(function ($line) { |
|
| 24 | + $releaseLogs = array_map(function($line) { |
|
| 25 | 25 | return json_decode($line, true); |
| 26 | 26 | }, explode("\n", run('tail -n 300 .dep/releases_log'))); |
| 27 | 27 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | }); |
| 30 | 30 | |
| 31 | 31 | // Return list of release names on host. |
| 32 | -set('releases_list', function () { |
|
| 32 | +set('releases_list', function() { |
|
| 33 | 33 | cd('{{deploy_path}}'); |
| 34 | 34 | |
| 35 | 35 | // If there is no releases return empty list. |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | // Will list only dirs in releases. |
| 41 | 41 | $ll = explode("\n", run('cd releases && ls -t -1 -d */')); |
| 42 | - $ll = array_map(function ($release) { |
|
| 42 | + $ll = array_map(function($release) { |
|
| 43 | 43 | return basename(rtrim(trim($release), '/')); |
| 44 | 44 | }, $ll); |
| 45 | 45 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | }); |
| 57 | 57 | |
| 58 | 58 | // Return release path. |
| 59 | -set('release_path', function () { |
|
| 59 | +set('release_path', function() { |
|
| 60 | 60 | $releaseExists = test('[ -h {{deploy_path}}/release ]'); |
| 61 | 61 | if ($releaseExists) { |
| 62 | 62 | $link = run("readlink {{deploy_path}}/release"); |
@@ -67,20 +67,20 @@ discard block |
||
| 67 | 67 | }); |
| 68 | 68 | |
| 69 | 69 | // Current release revision. Usually a git hash. |
| 70 | -set('release_revision', function () { |
|
| 70 | +set('release_revision', function() { |
|
| 71 | 71 | return run('cat {{release_path}}/REVISION'); |
| 72 | 72 | }); |
| 73 | 73 | |
| 74 | 74 | // Return the release path during a deployment |
| 75 | 75 | // but fallback to the current path otherwise. |
| 76 | -set('release_or_current_path', function () { |
|
| 76 | +set('release_or_current_path', function() { |
|
| 77 | 77 | $releaseExists = test('[ -h {{deploy_path}}/release ]'); |
| 78 | 78 | return $releaseExists ? get('release_path') : get('current_path'); |
| 79 | 79 | }); |
| 80 | 80 | |
| 81 | 81 | // Clean up unfinished releases and prepare next release |
| 82 | 82 | desc('Prepares release'); |
| 83 | -task('deploy:release', function () { |
|
| 83 | +task('deploy:release', function() { |
|
| 84 | 84 | cd('{{deploy_path}}'); |
| 85 | 85 | |
| 86 | 86 | // Clean up if there is unfinished release. |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | * +---------------------+-------------+----------------+--------+-----------+ |
| 156 | 156 | * ``` |
| 157 | 157 | */ |
| 158 | -task('releases', function () { |
|
| 158 | +task('releases', function() { |
|
| 159 | 159 | cd('{{deploy_path}}'); |
| 160 | 160 | |
| 161 | 161 | $releasesLog = get('releases_log'); |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | namespace Deployer; |
| 3 | 3 | |
| 4 | 4 | // Use mv -T if available. Will check automatically. |
| 5 | -set('use_atomic_symlink', function () { |
|
| 5 | +set('use_atomic_symlink', function() { |
|
| 6 | 6 | return commandSupportsOption('mv', '--no-target-directory'); |
| 7 | 7 | }); |
| 8 | 8 | |
| 9 | 9 | desc('Creates symlink to release'); |
| 10 | -task('deploy:symlink', function () { |
|
| 10 | +task('deploy:symlink', function() { |
|
| 11 | 11 | if (get('use_atomic_symlink')) { |
| 12 | 12 | run("mv -T {{deploy_path}}/release {{current_path}}"); |
| 13 | 13 | } else { |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | set('clear_use_sudo', false); |
| 9 | 9 | |
| 10 | 10 | desc('Cleanup files and/or directories'); |
| 11 | -task('deploy:clear_paths', function () { |
|
| 11 | +task('deploy:clear_paths', function() { |
|
| 12 | 12 | $paths = get('clear_paths'); |
| 13 | 13 | $sudo = get('clear_use_sudo') ? 'sudo' : ''; |
| 14 | 14 | $batch = 100; |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | // The public path is the path to be set as DocumentRoot and is defined in the `composer.json` of the project |
| 9 | 9 | // but defaults to `public` from Contao 5.0 on. |
| 10 | 10 | // This path is relative from the {{current_path}}, see [`recipe/provision/website.php`](/docs/recipe/provision/website.php#public_path). |
| 11 | -set('public_path', function () { |
|
| 11 | +set('public_path', function() { |
|
| 12 | 12 | $composerConfig = json_decode(file_get_contents('./composer.json'), true, 512, JSON_THROW_ON_ERROR); |
| 13 | 13 | |
| 14 | 14 | return $composerConfig['extra']['public-dir'] ?? 'public'; |
@@ -26,17 +26,17 @@ discard block |
||
| 26 | 26 | 'var/logs', |
| 27 | 27 | ]); |
| 28 | 28 | |
| 29 | -set('bin/console', function () { |
|
| 29 | +set('bin/console', function() { |
|
| 30 | 30 | return '{{bin/php}} {{release_or_current_path}}/vendor/bin/contao-console'; |
| 31 | 31 | }); |
| 32 | 32 | |
| 33 | -set('contao_version', function () { |
|
| 33 | +set('contao_version', function() { |
|
| 34 | 34 | $result = run('{{bin/console}} --version'); |
| 35 | 35 | preg_match_all('/(\d+\.?)+/', $result, $matches); |
| 36 | 36 | return $matches[0][0] ?? 'n/a'; |
| 37 | 37 | }); |
| 38 | 38 | |
| 39 | -set('symfony_version', function () { |
|
| 39 | +set('symfony_version', function() { |
|
| 40 | 40 | $result = run('{{bin/console}} about'); |
| 41 | 41 | preg_match_all('/(\d+\.?)+/', $result, $matches); |
| 42 | 42 | return $matches[0][0] ?? 5.0; |
@@ -52,31 +52,31 @@ discard block |
||
| 52 | 52 | // }); |
| 53 | 53 | // ``` |
| 54 | 54 | desc('Run Contao migrations'); |
| 55 | -task('contao:migrate', function () { |
|
| 55 | +task('contao:migrate', function() { |
|
| 56 | 56 | run('{{bin/console}} contao:migrate {{console_options}}'); |
| 57 | 57 | }); |
| 58 | 58 | |
| 59 | 59 | // Downloads the `contao-manager.phar.php` into the public path. |
| 60 | 60 | desc('Download the Contao Manager'); |
| 61 | -task('contao:manager:download', function () { |
|
| 61 | +task('contao:manager:download', function() { |
|
| 62 | 62 | run('curl -LsO https://download.contao.org/contao-manager/stable/contao-manager.phar && mv contao-manager.phar {{release_or_current_path}}/{{public_path}}/contao-manager.phar.php'); |
| 63 | 63 | }); |
| 64 | 64 | |
| 65 | 65 | // Locks the Contao install tool which is useful if you don't use it. |
| 66 | 66 | desc('Lock the Contao Install Tool'); |
| 67 | -task('contao:install:lock', function () { |
|
| 67 | +task('contao:install:lock', function() { |
|
| 68 | 68 | run('{{bin/console}} contao:install:lock {{console_options}}'); |
| 69 | 69 | }); |
| 70 | 70 | |
| 71 | 71 | // Locks the Contao Manager which is useful if you only need the API of the Manager rather than the UI. |
| 72 | 72 | desc('Lock the Contao Manager'); |
| 73 | -task('contao:manager:lock', function () { |
|
| 73 | +task('contao:manager:lock', function() { |
|
| 74 | 74 | cd('{{release_or_current_path}}'); |
| 75 | 75 | run('echo "99" > contao-manager/login.lock'); |
| 76 | 76 | }); |
| 77 | 77 | |
| 78 | 78 | desc('Enable maintenance mode'); |
| 79 | -task('contao:maintenance:enable', function () { |
|
| 79 | +task('contao:maintenance:enable', function() { |
|
| 80 | 80 | // Enable maintenance mode in both the current and release build, so that the maintenance mode will be enabled |
| 81 | 81 | // for the current installation before the symlink changes and the new installation after the symlink changed. |
| 82 | 82 | foreach (array_unique([parse('{{current_path}}'), parse('{{release_or_current_path}}')]) as $path) { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | }); |
| 92 | 92 | |
| 93 | 93 | desc('Disable maintenance mode'); |
| 94 | -task('contao:maintenance:disable', function () { |
|
| 94 | +task('contao:maintenance:disable', function() { |
|
| 95 | 95 | foreach (array_unique([parse('{{current_path}}'), parse('{{release_or_current_path}}')]) as $path) { |
| 96 | 96 | if (!test("[ -d $path ]")) { |
| 97 | 97 | continue; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | // Update using: `set('static_content_jobs', '1');` |
| 64 | 64 | set('static_content_jobs', '1'); |
| 65 | 65 | |
| 66 | -set('content_version', function () { |
|
| 66 | +set('content_version', function() { |
|
| 67 | 67 | return time(); |
| 68 | 68 | }); |
| 69 | 69 | |
@@ -108,14 +108,14 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | set('bin/magento', '{{release_or_current_path}}/{{magento_dir}}/bin/magento'); |
| 110 | 110 | |
| 111 | -set('magento_version', function () { |
|
| 111 | +set('magento_version', function() { |
|
| 112 | 112 | // detect version |
| 113 | 113 | $versionOutput = run('{{bin/php}} {{bin/magento}} --version'); |
| 114 | 114 | preg_match('/(\d+\.?)+(-p\d+)?$/', $versionOutput, $matches); |
| 115 | 115 | return $matches[0] ?? '2.0'; |
| 116 | 116 | }); |
| 117 | 117 | |
| 118 | -set('config_import_needed', function () { |
|
| 118 | +set('config_import_needed', function() { |
|
| 119 | 119 | // detect if app:config:import is needed |
| 120 | 120 | try { |
| 121 | 121 | run('{{bin/php}} {{bin/magento}} app:config:status'); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | return false; |
| 130 | 130 | }); |
| 131 | 131 | |
| 132 | -set('database_upgrade_needed', function () { |
|
| 132 | +set('database_upgrade_needed', function() { |
|
| 133 | 133 | // detect if setup:upgrade is needed |
| 134 | 134 | try { |
| 135 | 135 | run('{{bin/php}} {{bin/magento}} setup:db:status'); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | // 'MAGE_MODE' => 'production' |
| 165 | 165 | // ``` |
| 166 | 166 | desc('Compiles magento di'); |
| 167 | -task('magento:compile', function () { |
|
| 167 | +task('magento:compile', function() { |
|
| 168 | 168 | run("{{bin/php}} {{bin/magento}} setup:di:compile"); |
| 169 | 169 | run('cd {{release_or_current_path}}/{{magento_dir}} && {{bin/composer}} dump-autoload -o'); |
| 170 | 170 | }); |
@@ -190,13 +190,13 @@ discard block |
||
| 190 | 190 | // ] |
| 191 | 191 | // ``` |
| 192 | 192 | desc('Deploys assets'); |
| 193 | -task('magento:deploy:assets', function () { |
|
| 193 | +task('magento:deploy:assets', function() { |
|
| 194 | 194 | $themesToCompile = ''; |
| 195 | 195 | if (get('split_static_deployment')) { |
| 196 | 196 | invoke('magento:deploy:assets:adminhtml'); |
| 197 | 197 | invoke('magento:deploy:assets:frontend'); |
| 198 | 198 | } else { |
| 199 | - if (count(get('magento_themes')) > 0 ) { |
|
| 199 | + if (count(get('magento_themes')) > 0) { |
|
| 200 | 200 | $themes = array_is_list(get('magento_themes')) ? get('magento_themes') : array_keys(get('magento_themes')); |
| 201 | 201 | foreach ($themes as $theme) { |
| 202 | 202 | $themesToCompile .= ' -t ' . $theme; |
@@ -207,12 +207,12 @@ discard block |
||
| 207 | 207 | }); |
| 208 | 208 | |
| 209 | 209 | desc('Deploys assets for backend only'); |
| 210 | -task('magento:deploy:assets:adminhtml', function () { |
|
| 210 | +task('magento:deploy:assets:adminhtml', function() { |
|
| 211 | 211 | magentoDeployAssetsSplit('backend'); |
| 212 | 212 | }); |
| 213 | 213 | |
| 214 | 214 | desc('Deploys assets for frontend only'); |
| 215 | -task('magento:deploy:assets:frontend', function () { |
|
| 215 | +task('magento:deploy:assets:frontend', function() { |
|
| 216 | 216 | magentoDeployAssetsSplit('frontend'); |
| 217 | 217 | }); |
| 218 | 218 | |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | : 'adminhtml'; |
| 247 | 247 | |
| 248 | 248 | if ($useDefaultLanguages) { |
| 249 | - $themes = '-t '.implode(' -t ', $themes); |
|
| 249 | + $themes = '-t ' . implode(' -t ', $themes); |
|
| 250 | 250 | |
| 251 | 251 | run("{{bin/php}} {{bin/magento}} setup:static-content:deploy -f --area=$staticContentArea --content-version={{content_version}} {{static_deploy_options}} $defaultLanguages $themes -j {{static_content_jobs}}"); |
| 252 | 252 | return; |
@@ -260,9 +260,9 @@ discard block |
||
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | desc('Syncs content version'); |
| 263 | -task('magento:sync:content_version', function () { |
|
| 263 | +task('magento:sync:content_version', function() { |
|
| 264 | 264 | $timestamp = time(); |
| 265 | - on(select('all'), function (Host $host) use ($timestamp) { |
|
| 265 | + on(select('all'), function(Host $host) use ($timestamp) { |
|
| 266 | 266 | $host->set('content_version', $timestamp); |
| 267 | 267 | }); |
| 268 | 268 | })->once(); |
@@ -270,26 +270,25 @@ discard block |
||
| 270 | 270 | before('magento:deploy:assets', 'magento:sync:content_version'); |
| 271 | 271 | |
| 272 | 272 | desc('Enables maintenance mode'); |
| 273 | -task('magento:maintenance:enable', function () { |
|
| 273 | +task('magento:maintenance:enable', function() { |
|
| 274 | 274 | // do not use {{bin/magento}} because it would be in "release" but the maintenance mode must be set in "current" |
| 275 | 275 | run("if [ -d $(echo {{current_path}}) ]; then {{bin/php}} {{current_path}}/{{magento_dir}}/bin/magento maintenance:enable; fi"); |
| 276 | 276 | }); |
| 277 | 277 | |
| 278 | 278 | desc('Disables maintenance mode'); |
| 279 | -task('magento:maintenance:disable', function () { |
|
| 279 | +task('magento:maintenance:disable', function() { |
|
| 280 | 280 | // do not use {{bin/magento}} because it would be in "release" but the maintenance mode must be set in "current" |
| 281 | 281 | run("if [ -d $(echo {{current_path}}) ]; then {{bin/php}} {{current_path}}/{{magento_dir}}/bin/magento maintenance:disable; fi"); |
| 282 | 282 | }); |
| 283 | 283 | |
| 284 | 284 | desc('Set maintenance mode if needed'); |
| 285 | -task('magento:maintenance:enable-if-needed', function () { |
|
| 286 | - ! get('enable_zerodowntime') || get('database_upgrade_needed') || get('config_import_needed') ? |
|
| 287 | - invoke('magento:maintenance:enable') : |
|
| 288 | - writeln('Config and database up to date => no maintenance mode'); |
|
| 285 | +task('magento:maintenance:enable-if-needed', function() { |
|
| 286 | + !get('enable_zerodowntime') || get('database_upgrade_needed') || get('config_import_needed') ? |
|
| 287 | + invoke('magento:maintenance:enable') : writeln('Config and database up to date => no maintenance mode'); |
|
| 289 | 288 | }); |
| 290 | 289 | |
| 291 | 290 | desc('Config Import'); |
| 292 | -task('magento:config:import', function () { |
|
| 291 | +task('magento:config:import', function() { |
|
| 293 | 292 | if (get('config_import_needed')) { |
| 294 | 293 | run('{{bin/php}} {{bin/magento}} app:config:import --no-interaction'); |
| 295 | 294 | } else { |
@@ -298,7 +297,7 @@ discard block |
||
| 298 | 297 | }); |
| 299 | 298 | |
| 300 | 299 | desc('Upgrades magento database'); |
| 301 | -task('magento:upgrade:db', function () { |
|
| 300 | +task('magento:upgrade:db', function() { |
|
| 302 | 301 | if (get('database_upgrade_needed')) { |
| 303 | 302 | run("{{bin/php}} {{bin/magento}} setup:db-schema:upgrade --no-interaction"); |
| 304 | 303 | run("{{bin/php}} {{bin/magento}} setup:db-data:upgrade --no-interaction"); |
@@ -308,7 +307,7 @@ discard block |
||
| 308 | 307 | })->once(); |
| 309 | 308 | |
| 310 | 309 | desc('Flushes Magento Cache'); |
| 311 | -task('magento:cache:flush', function () { |
|
| 310 | +task('magento:cache:flush', function() { |
|
| 312 | 311 | run("{{bin/php}} {{bin/magento}} cache:flush"); |
| 313 | 312 | }); |
| 314 | 313 | |
@@ -359,7 +358,7 @@ discard block |
||
| 359 | 358 | set('repository', null); |
| 360 | 359 | |
| 361 | 360 | // The relative path to the artifact file. If the directory does not exist, it will be created |
| 362 | -set('artifact_path', function () { |
|
| 361 | +set('artifact_path', function() { |
|
| 363 | 362 | if (!testLocally('[ -d {{artifact_dir}} ]')) { |
| 364 | 363 | runLocally('mkdir -p {{artifact_dir}}'); |
| 365 | 364 | } |
@@ -367,7 +366,7 @@ discard block |
||
| 367 | 366 | }); |
| 368 | 367 | |
| 369 | 368 | // The location of the tar command. On MacOS you should have installed gtar, as it supports the required settings |
| 370 | -set('bin/tar', function () { |
|
| 369 | +set('bin/tar', function() { |
|
| 371 | 370 | if (commandExist('gtar')) { |
| 372 | 371 | return which('gtar'); |
| 373 | 372 | } else { |
@@ -388,12 +387,12 @@ discard block |
||
| 388 | 387 | }); |
| 389 | 388 | |
| 390 | 389 | desc('Uploads artifact in release folder for extraction.'); |
| 391 | -task('artifact:upload', function () { |
|
| 390 | +task('artifact:upload', function() { |
|
| 392 | 391 | upload(get('artifact_path'), '{{release_path}}'); |
| 393 | 392 | }); |
| 394 | 393 | |
| 395 | 394 | desc('Extracts artifact in release path.'); |
| 396 | -task('artifact:extract', function () { |
|
| 395 | +task('artifact:extract', function() { |
|
| 397 | 396 | run('{{bin/tar}} -xzpf {{release_path}}/{{artifact_file}} -C {{release_path}}'); |
| 398 | 397 | run('rm -rf {{release_path}}/{{artifact_file}}'); |
| 399 | 398 | }); |
@@ -445,7 +444,7 @@ discard block |
||
| 445 | 444 | |
| 446 | 445 | |
| 447 | 446 | desc('Adds additional files and dirs to the list of shared files and dirs'); |
| 448 | -task('deploy:additional-shared', function () { |
|
| 447 | +task('deploy:additional-shared', function() { |
|
| 449 | 448 | add('shared_files', get('additional_shared_files')); |
| 450 | 449 | add('shared_dirs', get('additional_shared_dirs')); |
| 451 | 450 | }); |
@@ -460,7 +459,7 @@ discard block |
||
| 460 | 459 | * ``` |
| 461 | 460 | **/ |
| 462 | 461 | desc('Update cache id_prefix'); |
| 463 | -task('magento:set_cache_prefix', function () { |
|
| 462 | +task('magento:set_cache_prefix', function() { |
|
| 464 | 463 | //download current env config |
| 465 | 464 | $tmpConfigFile = tempnam(sys_get_temp_dir(), 'deployer_config'); |
| 466 | 465 | download('{{deploy_path}}/shared/' . ENV_CONFIG_FILE_PATH, $tmpConfigFile); |
@@ -500,7 +499,7 @@ discard block |
||
| 500 | 499 | * After successful deployment, move the tmp_env.php file to env.php ready for next deployment |
| 501 | 500 | */ |
| 502 | 501 | desc('Cleanup cache id_prefix env files'); |
| 503 | -task('magento:cleanup_cache_prefix', function () { |
|
| 502 | +task('magento:cleanup_cache_prefix', function() { |
|
| 504 | 503 | run('rm {{deploy_path}}/shared/' . ENV_CONFIG_FILE_PATH); |
| 505 | 504 | run('rm {{release_or_current_path}}/' . ENV_CONFIG_FILE_PATH); |
| 506 | 505 | run('mv {{deploy_path}}/shared/' . TMP_ENV_CONFIG_FILE_PATH . ' {{deploy_path}}/shared/' . ENV_CONFIG_FILE_PATH); |
@@ -516,7 +515,7 @@ discard block |
||
| 516 | 515 | * ``` |
| 517 | 516 | */ |
| 518 | 517 | desc('Remove cron from crontab and kill running cron jobs'); |
| 519 | -task('magento:cron:stop', function () { |
|
| 518 | +task('magento:cron:stop', function() { |
|
| 520 | 519 | if (has('previous_release')) { |
| 521 | 520 | run('{{bin/php}} {{previous_release}}/{{magento_dir}}/bin/magento cron:remove'); |
| 522 | 521 | } |
@@ -532,7 +531,7 @@ discard block |
||
| 532 | 531 | * ``` |
| 533 | 532 | */ |
| 534 | 533 | desc('Install cron in crontab'); |
| 535 | -task('magento:cron:install', function () { |
|
| 534 | +task('magento:cron:install', function() { |
|
| 536 | 535 | run('cd {{release_or_current_path}}'); |
| 537 | 536 | run('{{bin/php}} {{bin/magento}} cron:install'); |
| 538 | 537 | }); |