Skip to content

Commit

Permalink
feat: add input for archive flag (#23)
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Dollst <[email protected]>
  • Loading branch information
phidol and phidol authored Aug 8, 2024
1 parent 2c65cdb commit 2c0114c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
5 changes: 5 additions & 0 deletions vercel-deployment-task-source/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ async function run() {

const debug = getBoolInput("debug");

const archive = getBoolInput("archive");

const vercelProjectId = reconcileConfigurationInput(
"vercelProjectId",
"VERCEL_PROJECT_ID",
Expand Down Expand Up @@ -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());

Expand Down
11 changes: 9 additions & 2 deletions vercel-deployment-task-source/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"author": "Vercel",
"version": {
"Major": 1,
"Minor": 2,
"Patch": 5
"Minor": 3,
"Patch": 0
},
"instanceNameFormat": "Deploying $(vercelProject) to Vercel",
"inputs": [
Expand Down Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit 2c0114c

Please sign in to comment.