Skip to content

Commit

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

* Update vss-extension.json

* Update task.json

---------

Co-authored-by: Cody Brouwers <[email protected]>
  • Loading branch information
phidol and codybrouwers authored Aug 22, 2024
1 parent 1497fbc commit 4919c86
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 @@ -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`
Expand Down
7 changes: 6 additions & 1 deletion vercel-deployment-task-source/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ async function run() {

const archive = getBoolInput("archive");

const logs = getBoolInput("logs");

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

Expand Down Expand Up @@ -248,7 +254,6 @@ async function run() {
}
}


const vercelDeploy = vercel.arg(vercelDeployArgs);
({ stdout, stderr, code } = vercelDeploy.execSync());

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 @@ -10,7 +10,7 @@
"author": "Vercel",
"version": {
"Major": 1,
"Minor": 4,
"Minor": 5,
"Patch": 0
},
"instanceNameFormat": "Deploying $(vercelProject) to Vercel",
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.4.0",
"version": "1.5.0",
"publisher": "Vercel",
"public": true,
"targets": [
Expand Down

0 comments on commit 4919c86

Please sign in to comment.