From 1bd4468f570e9c3b4c4d8add36be700178417aaa Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 12 Dec 2019 15:48:50 +0200 Subject: [PATCH] grunt composer install --- Gruntfile.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 5b2a22629a..ef7444cbbb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,8 +18,18 @@ * You should have received a copy of the GNU General Public License * along with EspoCRM. If not, see http://www.gnu.org/licenses/. ************************************************************************/ + module.exports = function (grunt) { + var runComposerInstall = false; + if (process.argv.length > 1) { + for (var i in process.argv) { + if (process.argv[i] === '--ci') { + runComposerInstall = true; + } + } + } + var jsFilesToMinify = [ 'client/lib/jquery-2.1.4.min.js', 'client/lib/underscore-min.js', @@ -83,6 +93,11 @@ module.exports = function (grunt) { } var fs = require('fs'); + var cp = require('child_process'); + + if (runComposerInstall) { + cp.execSync("composer install", {stdio: 'ignore'}); + } var themeList = []; fs.readdirSync('application/Espo/Resources/metadata/themes').forEach(function (file) { @@ -294,6 +309,6 @@ module.exports = function (grunt) { 'clean:beforeFinal', 'copy:final', 'chmod', - 'clean:final' + 'clean:final', ]); };