From 03862a10daa0b605d2e1defc6d4a01c756c52e06 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Mon, 19 Mar 2018 14:20:13 +0800 Subject: [PATCH] refactor: make build-fixtures slient in CI building --- scripts/build-fixtures | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/build-fixtures b/scripts/build-fixtures index b98e7be123..ec2c140392 100755 --- a/scripts/build-fixtures +++ b/scripts/build-fixtures @@ -48,11 +48,15 @@ for (let fixture of fixtures) { }) } -const concurrency = Math.min(4, cpus().length) +const options = { + renderer: process.env.CI === true ? 'silent' : 'default', + nonTTYRenderer: 'silent', + concurrent: Math.min(4, cpus().length) +} new Listr([{ - title: `Build ${fixtures.length} fixtures with concurrency of ${concurrency}`, - task: () => new Listr(tasks, {concurrent: concurrency}) -}], { nonTTYRenderer: 'silent' }) + title: `Build ${fixtures.length} fixtures with concurrency of ${options.concurrent}`, + task: () => new Listr(tasks, {concurrent: options.concurrent}) +}], options) .run() .catch(console.error) // eslint-disable-line no-console .then(() => process.exit(0))