Skip to content

Commit

Permalink
feat: add input to enable --logs flag (#34)
Browse files Browse the repository at this point in the history
* feat: add input to enable --logs flag

* Bump extension and task versions

---------

Co-authored-by: Cody Brouwers <[email protected]>
  • Loading branch information
phidol and codybrouwers authored Sep 17, 2024
1 parent f4bdd93 commit 4c1dc10
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,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`
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 @@ -131,6 +131,8 @@ async function run() {

const archive = getBoolInput("archive");

const logs = getBoolInput("logs");

const vercelProjectId = reconcileConfigurationInput(
"vercelProjectId",
"VERCEL_PROJECT_ID",
Expand Down Expand Up @@ -192,6 +194,9 @@ async function run() {
if (debug) {
vercelDeployArgs.push("--debug");
}
if (logs) {
vercelDeployArgs.push("--logs");
}
if (archive) {
vercelDeployArgs.push("--archive=tgz");
}
Expand Down
9 changes: 8 additions & 1 deletion vercel-deployment-task-source/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"version": {
"Major": 1,
"Minor": 6,
"Patch": 0
"Patch": 1
},
"instanceNameFormat": "Deploying $(vercelProject) to Vercel",
"inputs": [
Expand Down Expand Up @@ -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": [
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.6.0",
"version": "1.6.1",
"publisher": "Vercel",
"public": true,
"targets": [
Expand Down

0 comments on commit 4c1dc10

Please sign in to comment.