From 4919c86896ba2972a3f7147b3e6f96c7eb236479 Mon Sep 17 00:00:00 2001 From: Philipp Dollst Date: Thu, 22 Aug 2024 17:59:46 +0200 Subject: [PATCH] feat: add input to enable --logs flag (#29) * feat: add input to enable --logs flag * Update vss-extension.json * Update task.json --------- Co-authored-by: Cody Brouwers <11965195+codybrouwers@users.noreply.github.com> --- README.md | 10 ++++++++++ vercel-deployment-task-source/src/index.ts | 7 ++++++- vercel-deployment-task-source/task.json | 9 ++++++++- vss-extension.json | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 12f8d6f..c404385 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,16 @@ The configuration inputs `vercelProjectID`, `vercelOrgID`, and `vercelToken` can Required: `false` +- `logs` + + Enable `--logs` flag for the internal Vercel CLI operations. + + Type: `boolean` + + Default: `false` + + Required: `false` + #### Outputs - `deploymentURL` diff --git a/vercel-deployment-task-source/src/index.ts b/vercel-deployment-task-source/src/index.ts index 6da8982..f9f447c 100644 --- a/vercel-deployment-task-source/src/index.ts +++ b/vercel-deployment-task-source/src/index.ts @@ -135,6 +135,8 @@ async function run() { const archive = getBoolInput("archive"); + const logs = getBoolInput("logs"); + const vercelProjectId = reconcileConfigurationInput( "vercelProjectId", "VERCEL_PROJECT_ID", @@ -199,6 +201,10 @@ async function run() { if (archive) { vercelDeployArgs.push("--archive=tgz"); } + + if (logs) { + vercelDeployArgs.push("--logs"); + } const project = await getProject(vercelProjectId, vercelOrgId, vercelToken) @@ -248,7 +254,6 @@ async function run() { } } - const vercelDeploy = vercel.arg(vercelDeployArgs); ({ stdout, stderr, code } = vercelDeploy.execSync()); diff --git a/vercel-deployment-task-source/task.json b/vercel-deployment-task-source/task.json index edb6f74..f2247c5 100644 --- a/vercel-deployment-task-source/task.json +++ b/vercel-deployment-task-source/task.json @@ -10,7 +10,7 @@ "author": "Vercel", "version": { "Major": 1, - "Minor": 4, + "Minor": 5, "Patch": 0 }, "instanceNameFormat": "Deploying $(vercelProject) to Vercel", @@ -63,6 +63,13 @@ "label": "Enable compression of the deployment code into a single file before uploading it", "required": false, "helpMarkDown": "Enable `--archive=tgz` flag for the internal Vercel CLI operations." + }, + { + "name": "logs", + "type": "boolean", + "label": "Enable build log output in the pipeline", + "required": false, + "helpMarkDown": "Enable `--logs` flag for the internal Vercel CLI operations." } ], "outputVariables": [ diff --git a/vss-extension.json b/vss-extension.json index 85d61c7..039e190 100644 --- a/vss-extension.json +++ b/vss-extension.json @@ -3,7 +3,7 @@ "manifestVersion": 1, "id": "vercel-deployment-extension", "name": "Vercel Deployment Extension", - "version": "1.4.0", + "version": "1.5.0", "publisher": "Vercel", "public": true, "targets": [