Commit a563813e988bd692aa7c6865b7b0e6e7030dd365

Authored by Eder Soares
Committed by GitHub
2 parents 3c37d264 67c4cb31
Exists in 2.8 and in 6 other branches 2.2, 2.3, 2.4, 2.5, 2.6, 2.7

Merge pull request #6458 from portabilis/community-patch-2019-10-04

Community patch 04/10/2019
.github/ISSUE_TEMPLATE/bugs.md 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +---
  2 +name: Reportar um bug
  3 +about: Encontrou um bug no i-Educar? Use este template!
  4 +title: ''
  5 +labels: ''
  6 +assignees: ''
  7 +
  8 +---
  9 +
  10 +Olá e obrigado por nos ajudar a tornar o i-Educar um projeto mais estável. Não esqueça de revisar o nosso
  11 +[guia de contribuição](https://github.com/portabilis/i-educar/blob/master/contributing.md) para saber melhor como colaborar com a nossa comunidade. Para reportar seu bug use o template abaixo:
  12 +
  13 +**MENU:**
  14 +
  15 +Nesta seção deve ser apontado qual o menu no sistema deve ser realizada a alteração.
  16 +
  17 +**DESCRIÇÃO:**
  18 +
  19 +Nesta seção deve ser colocado uma descrição do problema ou necessidade.
  20 +
  21 +**OBSERVAÇÕES:**
  22 +
  23 +Observações em geral sobre o problema apontado.
  24 +
  25 +**AMBIENTE:**
  26 +
  27 +- Plataforma utilizada (Docker, instalação direta)
  28 +- Sistema operacional e versão (Ubuntu 16.04, Windows 7)
  29 +- Navegador e versão (Chrome 75)
  30 +- Outros detalhes importantes
... ...
.github/ISSUE_TEMPLATE/outros.md 0 → 100644
... ... @@ -0,0 +1,19 @@
  1 +---
  2 +name: Outros
  3 +about: Para indicar melhorias ou recursos use este template!
  4 +title: ''
  5 +labels: ''
  6 +assignees: ''
  7 +
  8 +---
  9 +
  10 +Olá e obrigado por nos ajudar a tornar o i-Educar um projeto melhor. Não esqueça de revisar o nosso
  11 +[guia de contribuição](https://github.com/portabilis/i-educar/blob/master/contributing.md) para saber melhor como colaborar com a nossa comunidade. Você também pode usar o template abaixo para preencher sua issue:
  12 +
  13 +**CONTEXTO:**
  14 +
  15 +Por que esta alteração é importante? Como você usaria isto? Como esta alteração pode beneficiar outros usuários?
  16 +
  17 +**IMPLEMENTAÇÃO:**
  18 +
  19 +Não obrigatório, mas sugira uma idéia de como isto poderia ser implementado.
... ...
.github/issue_template/bugs.md
... ... @@ -1,30 +0,0 @@
1   ----
2   -name: Reportar um bug
3   -about: Encontrou um bug no i-Educar? Use este template!
4   -title: ''
5   -labels: ''
6   -assignees: ''
7   -
8   ----
9   -
10   -Olá e obrigado por nos ajudar a tornar o i-Educar um projeto mais estável. Não esqueça de revisar o nosso
11   -[guia de contribuição](https://github.com/portabilis/i-educar/blob/master/contributing.md) para saber melhor como colaborar com a nossa comunidade. Para reportar seu bug use o template abaixo:
12   -
13   -**MENU:**
14   -
15   -Nesta seção deve ser apontado qual o menu no sistema deve ser realizada a alteração.
16   -
17   -**DESCRIÇÃO:**
18   -
19   -Nesta seção deve ser colocado uma descrição do problema ou necessidade.
20   -
21   -**OBSERVAÇÕES:**
22   -
23   -Observações em geral sobre o problema apontado.
24   -
25   -**AMBIENTE:**
26   -
27   -- Plataforma utilizada (Docker, instalação direta)
28   -- Sistema operacional e versão (Ubuntu 16.04, Windows 7)
29   -- Navegador e versão (Chrome 75)
30   -- Outros detalhes importantes
.github/issue_template/outros.md
... ... @@ -1,19 +0,0 @@
1   ----
2   -name: Outros
3   -about: Para indicar melhorias ou recursos use este template!
4   -title: ''
5   -labels: ''
6   -assignees: ''
7   -
8   ----
9   -
10   -Olá e obrigado por nos ajudar a tornar o i-Educar um projeto melhor. Não esqueça de revisar o nosso
11   -[guia de contribuição](https://github.com/portabilis/i-educar/blob/master/contributing.md) para saber melhor como colaborar com a nossa comunidade. Você também pode usar o template abaixo para preencher sua issue:
12   -
13   -**CONTEXTO:**
14   -
15   -Por que esta alteração é importante? Como você usaria isto? Como esta alteração pode beneficiar outros usuários?
16   -
17   -**IMPLEMENTAÇÃO:**
18   -
19   -Não obrigatório, mas sugira uma idéia de como isto poderia ser implementado.
composer.json
... ... @@ -3,7 +3,7 @@
3 3 "description": "Software livre de gestão escolar",
4 4 "type": "project",
5 5 "license": "GPL-2.0-or-later",
6   - "version": "2.2.6",
  6 + "version": "2.2.7",
7 7 "keywords": [
8 8 "Portabilis",
9 9 "i-Educar"
... ...
composer.lock
... ... @@ -4,20 +4,20 @@
4 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 5 "This file is @generated automatically"
6 6 ],
7   - "content-hash": "7dbea36075b4338d292719d273a996db",
  7 + "content-hash": "5a017f9e03d28d1379df94e1a0cab062",
8 8 "packages": [
9 9 {
10 10 "name": "aws/aws-sdk-php",
11   - "version": "3.112.5",
  11 + "version": "3.112.9",
12 12 "source": {
13 13 "type": "git",
14 14 "url": "https://github.com/aws/aws-sdk-php.git",
15   - "reference": "5c6f05d68576f845a8391b83020b480840eca759"
  15 + "reference": "224955fcb7ca9edc8de3e4147c0b180aeaee5a48"
16 16 },
17 17 "dist": {
18 18 "type": "zip",
19   - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/5c6f05d68576f845a8391b83020b480840eca759",
20   - "reference": "5c6f05d68576f845a8391b83020b480840eca759",
  19 + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/224955fcb7ca9edc8de3e4147c0b180aeaee5a48",
  20 + "reference": "224955fcb7ca9edc8de3e4147c0b180aeaee5a48",
21 21 "shasum": ""
22 22 },
23 23 "require": {
... ... @@ -87,7 +87,7 @@
87 87 "s3",
88 88 "sdk"
89 89 ],
90   - "time": "2019-09-20T22:08:27+00:00"
  90 + "time": "2019-09-26T18:13:00+00:00"
91 91 },
92 92 {
93 93 "name": "cocur/slugify",
... ... @@ -1098,22 +1098,22 @@
1098 1098 },
1099 1099 {
1100 1100 "name": "honeybadger-io/honeybadger-laravel",
1101   - "version": "v1.7.2",
  1101 + "version": "v1.7.3",
1102 1102 "source": {
1103 1103 "type": "git",
1104 1104 "url": "https://github.com/honeybadger-io/honeybadger-laravel.git",
1105   - "reference": "2b5209a7df12bf09393174cc663146e5ad516d2a"
  1105 + "reference": "e084eda97051341808095447c1560377b01c3086"
1106 1106 },
1107 1107 "dist": {
1108 1108 "type": "zip",
1109   - "url": "https://api.github.com/repos/honeybadger-io/honeybadger-laravel/zipball/2b5209a7df12bf09393174cc663146e5ad516d2a",
1110   - "reference": "2b5209a7df12bf09393174cc663146e5ad516d2a",
  1109 + "url": "https://api.github.com/repos/honeybadger-io/honeybadger-laravel/zipball/e084eda97051341808095447c1560377b01c3086",
  1110 + "reference": "e084eda97051341808095447c1560377b01c3086",
1111 1111 "shasum": ""
1112 1112 },
1113 1113 "require": {
1114 1114 "honeybadger-io/honeybadger-php": "^1.7",
1115   - "illuminate/console": "^5.5|^6.0",
1116   - "illuminate/support": "^5.5|^6.0",
  1115 + "illuminate/console": "^5.5",
  1116 + "illuminate/support": "^5.5",
1117 1117 "php": "^7.1",
1118 1118 "sixlive/dotenv-editor": "^1.1"
1119 1119 },
... ... @@ -1163,7 +1163,7 @@
1163 1163 "logging",
1164 1164 "monitoring"
1165 1165 ],
1166   - "time": "2019-09-05T16:28:05+00:00"
  1166 + "time": "2019-09-21T14:45:50+00:00"
1167 1167 },
1168 1168 {
1169 1169 "name": "honeybadger-io/honeybadger-php",
... ... @@ -5211,16 +5211,16 @@
5211 5211 },
5212 5212 {
5213 5213 "name": "laravel/dusk",
5214   - "version": "v5.5.1",
  5214 + "version": "v5.5.2",
5215 5215 "source": {
5216 5216 "type": "git",
5217 5217 "url": "https://github.com/laravel/dusk.git",
5218   - "reference": "9d2a643dbeb27fafd7f7d3961b74ee62eb5081bf"
  5218 + "reference": "aed755282a13a9b36d26854a0105d519aa22fec9"
5219 5219 },
5220 5220 "dist": {
5221 5221 "type": "zip",
5222   - "url": "https://api.github.com/repos/laravel/dusk/zipball/9d2a643dbeb27fafd7f7d3961b74ee62eb5081bf",
5223   - "reference": "9d2a643dbeb27fafd7f7d3961b74ee62eb5081bf",
  5222 + "url": "https://api.github.com/repos/laravel/dusk/zipball/aed755282a13a9b36d26854a0105d519aa22fec9",
  5223 + "reference": "aed755282a13a9b36d26854a0105d519aa22fec9",
5224 5224 "shasum": ""
5225 5225 },
5226 5226 "require": {
... ... @@ -5272,7 +5272,7 @@
5272 5272 "testing",
5273 5273 "webdriver"
5274 5274 ],
5275   - "time": "2019-09-12T07:51:16+00:00"
  5275 + "time": "2019-09-24T20:30:07+00:00"
5276 5276 },
5277 5277 {
5278 5278 "name": "laravel/telescope",
... ...
public/install.php
... ... @@ -107,7 +107,7 @@ if ($isInstalled) {
107 107 crossorigin="anonymous">
108 108 <link rel="stylesheet"
109 109 href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|PT+Mono">
110   - <link rel="stylesheet" href="css/install.css">
  110 + <link rel="stylesheet" href="css/install.css?version=<?php echo $currIeducarVersion ?>">
111 111 </head>
112 112  
113 113 <body>
... ... @@ -335,6 +335,6 @@ chmod -R 777 &lt;?= $path . &quot;\n&quot; ?&gt;
335 335 <script
336 336 src="https://www.promisejs.org/polyfills/promise-7.0.4.min.js">
337 337 </script>
338   - <script src="js/install.js"></script>
  338 + <script src="js/install.js?version=<?php echo $currIeducarVersion ?>"></script>
339 339 </body>
340 340 </html>
... ...
public/js/install.js
... ... @@ -36,10 +36,34 @@ if (updateButton) {
36 36 loading.style.display = 'block';
37 37 parent.parentNode.removeChild(parent);
38 38  
39   - get('/install.php?command=exec&param=migrate&id=' + timestamp)
40   - .then(function (result) {
  39 + const steps = [
  40 + {
  41 + command: 'link',
  42 + description: 'Gerando symlinks'
  43 + }, {
  44 + command: 'migrate',
  45 + description: 'Executando migrações'
  46 + }
  47 + ];
  48 +
  49 + let base = new Promise(function (resolve) {
  50 + return resolve(true);
  51 + });
  52 +
  53 + for (let i = 0; i < steps.length; i++) {
  54 + const step = steps[i];
  55 +
  56 + base = base.then(function () {
  57 + let url = '/install.php?command=exec&param=' + step.command + '&id=' + timestamp;
  58 +
  59 + if (step.extra) {
  60 + url += '&extra=' + step.extra;
  61 + }
  62 +
  63 + return get(url);
  64 + }).then(function (result) {
41 65 return new Promise(function (resolve, reject) {
42   - const interval = setInterval(function() {
  66 + const interval = setInterval(function () {
43 67 get('/install.php?command=consult&pid=' + result + '&id=' + timestamp)
44 68 .then(function (result) {
45 69 result = parseInt(result, 10);
... ... @@ -48,19 +72,24 @@ if (updateButton) {
48 72 resolve(result);
49 73 clearInterval(interval);
50 74 } else if (result > 0) {
51   - reject();
  75 + reject(step);
52 76 clearInterval(interval);
53 77 }
54 78 });
55 79 }, 1000);
56 80 });
57   - }).then(function () {
58   - alert('Atualização realizada com sucesso!');
59   - $.location.reload(true);
60   - }).catch(function () {
61   - alert('Ocorreu um erro ao atualizar sua instalação' + "\n" + 'Verifique o log em storage/logs para identificar o problema e tente novamente.');
62   - $.location.reload(true);
63 81 });
  82 + }
  83 +
  84 + base.then(function () {
  85 + alert('Atualização realizada com sucesso!');
  86 + $.location.reload(true);
  87 + });
  88 +
  89 + base.catch(function (error) {
  90 + alert('Ocorreu um erro ao atualizar sua instalação' + "\n" + 'Verifique o log em storage/logs para identificar o problema e tente novamente.');
  91 + $.location.reload(true);
  92 + });
64 93  
65 94 return false;
66 95 });
... ...
scripts/build
... ... @@ -8,6 +8,7 @@ git checkout-index --prefix=${BUILD_FOLDER}/ -a -f
8 8 cd ${BUILD_FOLDER}
9 9 sed -i.bak 's/APP_ENV=local/APP_ENV=production/g' .env.example && rm .env.example.bak
10 10 sed -i.bak 's/APP_DEBUG=true/APP_DEBUG=false/g' .env.example && rm .env.example.bak
  11 +sed -i.bak 's/DB_HOST=postgres/DB_HOST=localhost/g' .env.example && rm .env.example.bak
11 12 composer install --no-dev --ignore-platform-reqs --optimize-autoloader
12 13 git clone https://github.com/portabilis/i-educar-reports-package.git ieducar/modules/Reports
13 14 rm -fR ieducar/modules/Reports/.git
... ...