From 2c0114cc7a0fc52ab372b0b5e22c11a9448a44b0 Mon Sep 17 00:00:00 2001 From: Philipp Dollst Date: Thu, 8 Aug 2024 19:43:16 +0200 Subject: [PATCH] feat: add input for archive flag (#23) Co-authored-by: Philipp Dollst --- README.md | 10 ++++++++++ vercel-deployment-task-source/src/index.ts | 5 +++++ vercel-deployment-task-source/task.json | 11 +++++++++-- vss-extension.json | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 410075b..d97b2c6 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,16 @@ The configuration inputs `vercelProjectID`, `vercelOrgID`, and `vercelToken` can Required: `false` +- `archive` + + Enable `--archive=tgz` 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 0dad668..b613068 100644 --- a/vercel-deployment-task-source/src/index.ts +++ b/vercel-deployment-task-source/src/index.ts @@ -129,6 +129,8 @@ async function run() { const debug = getBoolInput("debug"); + const archive = getBoolInput("archive"); + const vercelProjectId = reconcileConfigurationInput( "vercelProjectId", "VERCEL_PROJECT_ID", @@ -190,6 +192,9 @@ async function run() { if (debug) { vercelDeployArgs.push("--debug"); } + if (archive) { + vercelDeployArgs.push("--archive=tgz"); + } 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 c24b6dd..c74f9c4 100644 --- a/vercel-deployment-task-source/task.json +++ b/vercel-deployment-task-source/task.json @@ -10,8 +10,8 @@ "author": "Vercel", "version": { "Major": 1, - "Minor": 2, - "Patch": 5 + "Minor": 3, + "Patch": 0 }, "instanceNameFormat": "Deploying $(vercelProject) to Vercel", "inputs": [ @@ -56,6 +56,13 @@ "label": "Enable debug output", "required": false, "helpMarkDown": "Enable `--debug` output for the internal Vercel CLI operations." + }, + { + "name": "archive", + "type": "boolean", + "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." } ], "outputVariables": [ diff --git a/vss-extension.json b/vss-extension.json index 9877d15..ccb6152 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.2.5", + "version": "1.3.0", "publisher": "Vercel", "public": true, "targets": [