@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | set('slack_channel', false); |
70 | 70 | |
71 | 71 | // Title of project |
72 | -set('slack_title', function () { |
|
72 | +set('slack_title', function() { |
|
73 | 73 | return get('application', 'Project'); |
74 | 74 | }); |
75 | 75 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | desc('Notifies Slack'); |
99 | -task('slack:notify', function () { |
|
99 | +task('slack:notify', function() { |
|
100 | 100 | if (!get('slack_webhook', false)) { |
101 | 101 | warning('No Slack webhook configured'); |
102 | 102 | return; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | ->hidden(); |
117 | 117 | |
118 | 118 | desc('Notifies Slack about deploy finish'); |
119 | -task('slack:notify:success', function () { |
|
119 | +task('slack:notify:success', function() { |
|
120 | 120 | if (!get('slack_webhook', false)) { |
121 | 121 | warning('No Slack webhook configured'); |
122 | 122 | return; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | ->hidden(); |
138 | 138 | |
139 | 139 | desc('Notifies Slack about deploy failure'); |
140 | -task('slack:notify:failure', function () { |
|
140 | +task('slack:notify:failure', function() { |
|
141 | 141 | if (!get('slack_webhook', false)) { |
142 | 142 | warning('No Slack webhook configured'); |
143 | 143 | return; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | ->hidden(); |
158 | 158 | |
159 | 159 | desc('Notifies Slack about rollback'); |
160 | -task('slack:notify:rollback', function () { |
|
160 | +task('slack:notify:rollback', function() { |
|
161 | 161 | if (!get('slack_webhook', false)) { |
162 | 162 | warning('No Slack webhook configured'); |
163 | 163 | return; |
@@ -31,14 +31,14 @@ |
||
31 | 31 | namespace Deployer; |
32 | 32 | |
33 | 33 | // Automatically detects by using {{bin/php}}. |
34 | -set('php_fpm_version', function () { |
|
34 | +set('php_fpm_version', function() { |
|
35 | 35 | return run('{{bin/php}} -r "printf(\'%d.%d\', PHP_MAJOR_VERSION, PHP_MINOR_VERSION);"'); |
36 | 36 | }); |
37 | 37 | |
38 | 38 | set('php_fpm_service', 'php{{php_fpm_version}}-fpm'); |
39 | 39 | |
40 | 40 | desc('Reloads the php-fpm service'); |
41 | -task('php-fpm:reload', function () { |
|
41 | +task('php-fpm:reload', function() { |
|
42 | 42 | warning('Avoid reloading php-fpm [ï.at/avoid-php-fpm-reloading]'); |
43 | 43 | run('sudo systemctl reload {{php_fpm_service}}'); |
44 | 44 | }); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | use Deployer\Utility\Httpie; |
21 | 21 | |
22 | 22 | desc('Notifies Bugsnag of deployment'); |
23 | -task('bugsnag:notify', function () { |
|
23 | +task('bugsnag:notify', function() { |
|
24 | 24 | $data = [ |
25 | 25 | 'apiKey' => get('bugsnag_api_key'), |
26 | 26 | 'releaseStage' => get('target'), |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | use Deployer\Utility\Httpie; |
76 | 76 | |
77 | 77 | // Title of project |
78 | -set('teams_title', function () { |
|
78 | +set('teams_title', function() { |
|
79 | 79 | return get('application', 'Project'); |
80 | 80 | }); |
81 | 81 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | set('teams_failure_color', '#ff0909'); |
91 | 91 | |
92 | 92 | desc('Notifies Teams'); |
93 | -task('teams:notify', function () { |
|
93 | +task('teams:notify', function() { |
|
94 | 94 | if (!get('teams_webhook', false)) { |
95 | 95 | warning('No MS Teams webhook configured'); |
96 | 96 | return; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | ->hidden(); |
106 | 106 | |
107 | 107 | desc('Notifies Teams about deploy finish'); |
108 | -task('teams:notify:success', function () { |
|
108 | +task('teams:notify:success', function() { |
|
109 | 109 | if (!get('teams_webhook', false)) { |
110 | 110 | warning('No MS Teams webhook configured'); |
111 | 111 | return; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | ->hidden(); |
121 | 121 | |
122 | 122 | desc('Notifies Teams about deploy failure'); |
123 | -task('teams:notify:failure', function () { |
|
123 | +task('teams:notify:failure', function() { |
|
124 | 124 | if (!get('teams_webhook', false)) { |
125 | 125 | warning('No MS Teams webhook configured'); |
126 | 126 | return; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | set('ntfy_server', 'ntfy.sh'); |
90 | 90 | |
91 | 91 | // Title of project |
92 | -set('ntfy_title', function () { |
|
92 | +set('ntfy_title', function() { |
|
93 | 93 | return get('application', 'Project'); |
94 | 94 | }); |
95 | 95 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | set('ntfy_failure_tags', ''); |
105 | 105 | |
106 | 106 | desc('Notifies ntfy server'); |
107 | -task('ntfy:notify', function () { |
|
107 | +task('ntfy:notify', function() { |
|
108 | 108 | if (!get('ntfy_topic', false)) { |
109 | 109 | warning('No ntfy topic configured'); |
110 | 110 | return; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ->hidden(); |
123 | 123 | |
124 | 124 | desc('Notifies ntfy server about deploy finish'); |
125 | -task('ntfy:notify:success', function () { |
|
125 | +task('ntfy:notify:success', function() { |
|
126 | 126 | if (!get('ntfy_topic', false)) { |
127 | 127 | warning('No ntfy topic configured'); |
128 | 128 | return; |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | ->hidden(); |
141 | 141 | |
142 | 142 | desc('Notifies ntfy server about deploy failure'); |
143 | -task('ntfy:notify:failure', function () { |
|
143 | +task('ntfy:notify:failure', function() { |
|
144 | 144 | if (!get('ntfy_topic', false)) { |
145 | 145 | warning('No ntfy topic configured'); |
146 | 146 | return; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | set('ispmanager_aliaslist', []); |
60 | 60 | |
61 | 61 | desc('Installs ispmanager'); |
62 | -task('ispmanager:init', function () { |
|
62 | +task('ispmanager:init', function() { |
|
63 | 63 | $config = get('ispmanager'); |
64 | 64 | |
65 | 65 | if (!is_null($config['createDatabase']) || !is_null($config['deleteDatabase'])) { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | }); |
83 | 83 | |
84 | 84 | desc('Takes database servers list'); |
85 | -task('ispmanager:db-server-list', function () { |
|
85 | +task('ispmanager:db-server-list', function() { |
|
86 | 86 | $response = ispmanagerRequest('get', [ |
87 | 87 | 'func' => 'db.server', |
88 | 88 | ]); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | }); |
120 | 120 | |
121 | 121 | desc('Takes databases list'); |
122 | -task('ispmanager:db-list', function () { |
|
122 | +task('ispmanager:db-list', function() { |
|
123 | 123 | $response = ispmanagerRequest('get', [ |
124 | 124 | 'func' => 'db', |
125 | 125 | ]); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | }); |
142 | 142 | |
143 | 143 | desc('Takes domain list'); |
144 | -task('ispmanager:domain-list', function () { |
|
144 | +task('ispmanager:domain-list', function() { |
|
145 | 145 | $response = ispmanagerRequest('get', [ |
146 | 146 | 'func' => 'webdomain', |
147 | 147 | ]); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | }); |
158 | 158 | |
159 | 159 | desc('Creates new database'); |
160 | -task('ispmanager:db-create', function () { |
|
160 | +task('ispmanager:db-create', function() { |
|
161 | 161 | $config = get('ispmanager'); |
162 | 162 | |
163 | 163 | if (is_null($config['createDatabase'])) { |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | }); |
228 | 228 | |
229 | 229 | desc('Deletes database'); |
230 | -task('ispmanager:db-delete', function () { |
|
230 | +task('ispmanager:db-delete', function() { |
|
231 | 231 | $config = get('ispmanager'); |
232 | 232 | |
233 | 233 | if (is_null($config['deleteDatabase'])) { |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | }); |
279 | 279 | |
280 | 280 | desc('Creates new domain'); |
281 | -task('ispmanager:domain-create', function () { |
|
281 | +task('ispmanager:domain-create', function() { |
|
282 | 282 | $config = get('ispmanager'); |
283 | 283 | |
284 | 284 | if (is_null($config['createDomain'])) { |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | }); |
325 | 325 | |
326 | 326 | desc('Gets allowed PHP modes and versions'); |
327 | -task('ispmanager:get-php-list', function () { |
|
327 | +task('ispmanager:get-php-list', function() { |
|
328 | 328 | // Get www-root settings for fpm version |
329 | 329 | $response = ispmanagerRequest('get', [ |
330 | 330 | 'func' => 'user.edit', |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | }); |
371 | 371 | |
372 | 372 | desc('Prints allowed PHP modes and versions'); |
373 | -task('ispmanager:print-php-list', function () { |
|
373 | +task('ispmanager:print-php-list', function() { |
|
374 | 374 | invoke('ispmanager:get-php-list'); |
375 | 375 | |
376 | 376 | $versions = get('ispmanager_phplist'); |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | }); |
409 | 409 | |
410 | 410 | desc('Switches PHP version for domain'); |
411 | -task('ispmanager:domain-php-select', function () { |
|
411 | +task('ispmanager:domain-php-select', function() { |
|
412 | 412 | $config = get('ispmanager'); |
413 | 413 | |
414 | 414 | if (is_null($config['phpSelect'])) { |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | }); |
478 | 478 | |
479 | 479 | desc('Creates new domain alias'); |
480 | -task('ispmanager:domain-alias-create', function () { |
|
480 | +task('ispmanager:domain-alias-create', function() { |
|
481 | 481 | $config = get('ispmanager'); |
482 | 482 | |
483 | 483 | if (is_null($config['createAlias'])) { |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | }); |
547 | 547 | |
548 | 548 | desc('Deletes domain alias'); |
549 | -task('ispmanager:domain-alias-delete', function () { |
|
549 | +task('ispmanager:domain-alias-delete', function() { |
|
550 | 550 | $config = get('ispmanager'); |
551 | 551 | |
552 | 552 | if (is_null($config['deleteAlias'])) { |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | }); |
615 | 615 | |
616 | 616 | desc('Deletes domain'); |
617 | -task('ispmanager:domain-delete', function () { |
|
617 | +task('ispmanager:domain-delete', function() { |
|
618 | 618 | $config = get('ispmanager'); |
619 | 619 | |
620 | 620 | if (is_null($config['deleteDomain'])) { |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | }); |
662 | 662 | |
663 | 663 | desc('Auto task processing'); |
664 | -task('ispmanager:process', function () { |
|
664 | +task('ispmanager:process', function() { |
|
665 | 665 | $config = get('ispmanager'); |
666 | 666 | |
667 | 667 | if (!is_null($config['createDatabase'])) { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | use Deployer\Utility\Httpie; |
43 | 43 | |
44 | 44 | // Title of project |
45 | -set('chat_title', function () { |
|
45 | +set('chat_title', function() { |
|
46 | 46 | return get('application', 'Project'); |
47 | 47 | }); |
48 | 48 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | set('chat_line2', '{{stage}}'); |
57 | 57 | |
58 | 58 | desc('Notifies Google Hangouts Chat'); |
59 | -task('chat:notify', function () { |
|
59 | +task('chat:notify', function() { |
|
60 | 60 | if (!get('chat_webhook', false)) { |
61 | 61 | return; |
62 | 62 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ->hidden(); |
99 | 99 | |
100 | 100 | desc('Notifies Google Hangouts Chat about deploy finish'); |
101 | -task('chat:notify:success', function () { |
|
101 | +task('chat:notify:success', function() { |
|
102 | 102 | if (!get('chat_webhook', false)) { |
103 | 103 | return; |
104 | 104 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | ->hidden(); |
141 | 141 | |
142 | 142 | desc('Notifies Google Hangouts Chat about deploy failure'); |
143 | -task('chat:notify:failure', function () { |
|
143 | +task('chat:notify:failure', function() { |
|
144 | 144 | if (!get('chat_webhook', false)) { |
145 | 145 | return; |
146 | 146 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | require_once __DIR__ . '/npm.php'; |
22 | 22 | require_once __DIR__ . '/yarn.php'; |
23 | 23 | |
24 | -set('webpack_encore/package_manager', function () { |
|
24 | +set('webpack_encore/package_manager', function() { |
|
25 | 25 | if (test('[ -f {{release_path}}/yarn.lock ]')) { |
26 | 26 | return 'yarn'; |
27 | 27 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | set('webpack_encore/env', 'production'); |
33 | 33 | |
34 | 34 | desc('Runs webpack encore build'); |
35 | -task('webpack_encore:build', function () { |
|
35 | +task('webpack_encore:build', function() { |
|
36 | 36 | $packageManager = get('webpack_encore/package_manager'); |
37 | 37 | |
38 | 38 | if (!in_array($packageManager, ['npm', 'yarn'], true)) { |
@@ -28,7 +28,7 @@ |
||
28 | 28 | set('hipchat_url', 'https://api.hipchat.com/v1/rooms/message'); |
29 | 29 | |
30 | 30 | desc('Notifies Hipchat channel of deployment'); |
31 | -task('hipchat:notify', function () { |
|
31 | +task('hipchat:notify', function() { |
|
32 | 32 | $params = [ |
33 | 33 | 'room_id' => get('hipchat_room_id'), |
34 | 34 | 'from' => get('target'), |