From d8ce673088e6765e59c68d1f98cf60f093eca6a3 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 25 Sep 2022 08:00:53 +0000 Subject: [PATCH] fix: debug log for bp --- apps/api/src/lib/buildPacks/heroku.ts | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/apps/api/src/lib/buildPacks/heroku.ts b/apps/api/src/lib/buildPacks/heroku.ts index 4a0d77340..c9608aba2 100644 --- a/apps/api/src/lib/buildPacks/heroku.ts +++ b/apps/api/src/lib/buildPacks/heroku.ts @@ -5,34 +5,13 @@ export default async function (data: any): Promise { const { buildId, applicationId, tag, dockerId, debug, workdir, baseDirectory } = data try { await saveBuildLog({ line: `Building image started.`, buildId, applicationId }); - const { stdout } = await executeDockerCmd({ + await executeDockerCmd({ + debug, dockerId, command: `pack build -p ${workdir}${baseDirectory} ${applicationId}:${tag} --builder heroku/buildpacks:20` }) - if (debug) { - const array = stdout.split('\n') - for (const line of array) { - if (line !== '\n') { - await saveBuildLog({ - line: `${line.replace('\n', '')}`, - buildId, - applicationId - }); - } - } - } await saveBuildLog({ line: `Building image successful.`, buildId, applicationId }); } catch (error) { - const array = error.stdout.split('\n') - for (const line of array) { - if (line !== '\n') { - await saveBuildLog({ - line: `${line.replace('\n', '')}`, - buildId, - applicationId - }); - } - } throw error; } }