@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | throw new \Exception('Please, configure "telegram_chat_id" parameter.'); |
26 | 26 | }); |
27 | 27 | set('telegram_url', function () { |
28 | - return 'https://api.telegram.org/bot' . get('telegram_token') . '/sendmessage'; |
|
28 | + return 'https://api.telegram.org/bot' . get('telegram_token') . '/sendmessage'; |
|
29 | 29 | }); |
30 | 30 | |
31 | 31 | // Deploy message |
@@ -65,61 +65,61 @@ discard block |
||
65 | 65 | ->shallow() |
66 | 66 | ->hidden(); |
67 | 67 | |
68 | - desc('Notifying Telegram about deploy finish'); |
|
69 | - task('telegram:notify:success', function () { |
|
70 | - if (!get('telegram_token', false)) { |
|
71 | - return; |
|
72 | - } |
|
68 | + desc('Notifying Telegram about deploy finish'); |
|
69 | + task('telegram:notify:success', function () { |
|
70 | + if (!get('telegram_token', false)) { |
|
71 | + return; |
|
72 | + } |
|
73 | 73 | |
74 | - if (!get('telegram_chat_id', false)) { |
|
75 | - return; |
|
76 | - } |
|
74 | + if (!get('telegram_chat_id', false)) { |
|
75 | + return; |
|
76 | + } |
|
77 | 77 | |
78 | - $telegramUrl = get('telegram_url') . '?' . http_build_query ( |
|
79 | - Array ( |
|
80 | - 'chat_id' => get('telegram_chat_id'), |
|
81 | - 'text' => get('telegram_success_text'), |
|
82 | - 'parse_mode' => 'Markdown', |
|
83 | - ) |
|
84 | - ); |
|
78 | + $telegramUrl = get('telegram_url') . '?' . http_build_query ( |
|
79 | + Array ( |
|
80 | + 'chat_id' => get('telegram_chat_id'), |
|
81 | + 'text' => get('telegram_success_text'), |
|
82 | + 'parse_mode' => 'Markdown', |
|
83 | + ) |
|
84 | + ); |
|
85 | 85 | |
86 | - $httpie = Httpie::get($telegramUrl); |
|
86 | + $httpie = Httpie::get($telegramUrl); |
|
87 | 87 | |
88 | - if (get('telegram_proxy', '') !== '') { |
|
89 | - $httpie = $httpie->setopt(CURLOPT_PROXY, get('telegram_proxy')); |
|
90 | - } |
|
88 | + if (get('telegram_proxy', '') !== '') { |
|
89 | + $httpie = $httpie->setopt(CURLOPT_PROXY, get('telegram_proxy')); |
|
90 | + } |
|
91 | 91 | |
92 | - $httpie->send(); |
|
92 | + $httpie->send(); |
|
93 | 93 | }) |
94 | 94 | ->once() |
95 | 95 | ->shallow() |
96 | 96 | ->hidden(); |
97 | 97 | |
98 | - desc('Notifying Telegram about deploy failure'); |
|
99 | - task('telegram:notify:failure', function () { |
|
100 | - if (!get('telegram_token', false)) { |
|
101 | - return; |
|
102 | - } |
|
98 | + desc('Notifying Telegram about deploy failure'); |
|
99 | + task('telegram:notify:failure', function () { |
|
100 | + if (!get('telegram_token', false)) { |
|
101 | + return; |
|
102 | + } |
|
103 | 103 | |
104 | - if (!get('telegram_chat_id', false)) { |
|
105 | - return; |
|
106 | - } |
|
104 | + if (!get('telegram_chat_id', false)) { |
|
105 | + return; |
|
106 | + } |
|
107 | 107 | |
108 | - $telegramUrl = get('telegram_url') . '?' . http_build_query ( |
|
109 | - Array ( |
|
110 | - 'chat_id' => get('telegram_chat_id'), |
|
111 | - 'text' => get('telegram_failure_text'), |
|
112 | - 'parse_mode' => 'Markdown', |
|
113 | - ) |
|
114 | - ); |
|
108 | + $telegramUrl = get('telegram_url') . '?' . http_build_query ( |
|
109 | + Array ( |
|
110 | + 'chat_id' => get('telegram_chat_id'), |
|
111 | + 'text' => get('telegram_failure_text'), |
|
112 | + 'parse_mode' => 'Markdown', |
|
113 | + ) |
|
114 | + ); |
|
115 | 115 | |
116 | - $httpie = Httpie::get($telegramUrl); |
|
116 | + $httpie = Httpie::get($telegramUrl); |
|
117 | 117 | |
118 | - if (get('telegram_proxy', '') !== '') { |
|
119 | - $httpie = $httpie->setopt(CURLOPT_PROXY, get('telegram_proxy')); |
|
120 | - } |
|
118 | + if (get('telegram_proxy', '') !== '') { |
|
119 | + $httpie = $httpie->setopt(CURLOPT_PROXY, get('telegram_proxy')); |
|
120 | + } |
|
121 | 121 | |
122 | - $httpie->send(); |
|
122 | + $httpie->send(); |
|
123 | 123 | }) |
124 | 124 | ->once() |
125 | 125 | ->shallow() |
@@ -17,8 +17,8 @@ |
||
17 | 17 | }); |
18 | 18 | set('cimonitor_user', function () { |
19 | 19 | return [ |
20 | - 'name' => runLocally('git config --get user.name'), |
|
21 | - 'email' => runLocally('git config --get user.email'), |
|
20 | + 'name' => runLocally('git config --get user.name'), |
|
21 | + 'email' => runLocally('git config --get user.email'), |
|
22 | 22 | ]; |
23 | 23 | }); |
24 | 24 |
@@ -11,30 +11,30 @@ |
||
11 | 11 | |
12 | 12 | set('shared_files', ['config/settings.inc.php', '.htaccess']); |
13 | 13 | set('shared_dirs', [ |
14 | - 'img', |
|
15 | - 'log', |
|
16 | - 'download', |
|
17 | - 'upload', |
|
18 | - 'translations', |
|
19 | - 'mails', |
|
20 | - 'themes/default-bootstrap/lang', |
|
21 | - 'themes/default-bootstrap/mails', |
|
22 | - 'themes/default-bootstrap/pdf/lang', |
|
14 | + 'img', |
|
15 | + 'log', |
|
16 | + 'download', |
|
17 | + 'upload', |
|
18 | + 'translations', |
|
19 | + 'mails', |
|
20 | + 'themes/default-bootstrap/lang', |
|
21 | + 'themes/default-bootstrap/mails', |
|
22 | + 'themes/default-bootstrap/pdf/lang', |
|
23 | 23 | ] |
24 | 24 | ); |
25 | 25 | set('writable_dirs', [ |
26 | - 'img', |
|
27 | - 'log', |
|
28 | - 'cache', |
|
29 | - 'download', |
|
30 | - 'upload', |
|
31 | - 'translations', |
|
32 | - 'mails', |
|
33 | - 'themes/default-bootstrap/lang', |
|
34 | - 'themes/default-bootstrap/mails', |
|
35 | - 'themes/default-bootstrap/pdf/lang', |
|
36 | - 'themes/default-bootstrap/cache', |
|
37 | - ] |
|
26 | + 'img', |
|
27 | + 'log', |
|
28 | + 'cache', |
|
29 | + 'download', |
|
30 | + 'upload', |
|
31 | + 'translations', |
|
32 | + 'mails', |
|
33 | + 'themes/default-bootstrap/lang', |
|
34 | + 'themes/default-bootstrap/mails', |
|
35 | + 'themes/default-bootstrap/pdf/lang', |
|
36 | + 'themes/default-bootstrap/cache', |
|
37 | + ] |
|
38 | 38 | ); |
39 | 39 | |
40 | 40 | task('deploy', [ |
@@ -173,6 +173,4 @@ |
||
173 | 173 | $initializer->addTemplate('Drupal', new DrupalTemplate()); |
174 | 174 | $initializer->addTemplate('TYPO3', new Typo3Template()); |
175 | 175 | |
176 | - return $initializer; |
|
177 | - } |
|
178 | -} |
|
176 | + return $initializer |
|
179 | 177 | \ No newline at end of file |