diff --git a/gulpfile.js b/gulpfile.js index ce113fc77..80ec121eb 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -369,18 +369,6 @@ function phpDebugBar() { .pipe(gulp.dest(config.production + '/php-debugbar')); } -function formatPHPExec(exec) { - let php_exec; - let is_windows = process.platform === "win32"; - if (is_windows) { - php_exec = `php -r "` + exec.split("\n").join("") + `"`; - } else { - php_exec = `php -r '` + exec.split("'").join('"') + `'`; - } - - return php_exec; -} - // Operazioni per la release function release(done) { // Impostazione dello zip @@ -410,18 +398,19 @@ function release(done) { '!files/**', '!logs/**', '!config.inc.php', + '!update/structure.php', '!**/*.(lock|phar|log|zip|bak|jar|txt)', '!**/~*', - '!vendor/tecnickcom/tcpdf/examples/*', + '!vendor/tecnickcom/tcpdf/examples/**', '!vendor/tecnickcom/tcpdf/fonts/*', 'vendor/tecnickcom/tcpdf/fonts/*helvetica*', '!vendor/mpdf/mpdf/tmp/*', '!vendor/mpdf/mpdf/ttfonts/*', 'vendor/mpdf/mpdf/ttfonts/DejaVuinfo.txt', 'vendor/mpdf/mpdf/ttfonts/DejaVu*Condensed*', - '!vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/*', - '!vendor/respect/validation/tests/*', - '!vendor/willdurand/geocoder/tests/*', + '!vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/**', + '!vendor/respect/validation/tests/**', + '!vendor/willdurand/geocoder/tests/**', ], { dot: true, }).then(function (files) { @@ -452,16 +441,7 @@ function release(done) { archive.file('checksum.json', {}); // Aggiunta del file per il controllo di integrità del database - let exec = ` - error_reporting(0); - $skip_permissions = true; - include_once __DIR__.DIRECTORY_SEPARATOR.'core.php'; - $info = Update::getDatabaseStructure(); - $response = json_encode($info); - echo $response;`; - let php_exec = formatPHPExec(exec); - - archive.append(shell.exec(php_exec, { + archive.append(shell.exec('php update/structure.php', { silent: true }).stdout, { name: 'database.json' diff --git a/update/structure.php b/update/structure.php new file mode 100644 index 000000000..7d5224812 --- /dev/null +++ b/update/structure.php @@ -0,0 +1,11 @@ +