Skip to content

Commit

Permalink
feat: add original deployment url output (#36)
Browse files Browse the repository at this point in the history
* feat: add original deployment url output

* Bump version to 1.6.3

---------

Co-authored-by: Cody Brouwers <[email protected]>
  • Loading branch information
phidol and codybrouwers authored Sep 17, 2024
1 parent 4f49587 commit da1eda5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ The configuration inputs `vercelProjectID`, `vercelOrgID`, and `vercelToken` can

Type: `string`

- `originalDeploymentURL`

Original URL of the deployment. Can be used to create your own alias in a depending separate task.

Type: `string`

- `deploymentTaskMessage`

The output from the deployment. Can be passed to Vercel Azure DevOps Pull Request Comment Task.
Expand Down
2 changes: 2 additions & 0 deletions vercel-deployment-task-source/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ async function run() {
);
}

const originalDeployURL = stdout;
let deployURL = stdout;

if (!deployToProduction) {
Expand Down Expand Up @@ -322,6 +323,7 @@ async function run() {
}
}

setVariable("originalDeploymentURL", originalDeployURL, false, true);
setVariable("deploymentURL", deployURL, false, true);
const message = `Successfully deployed to ${deployURL}`;
setVariable("deploymentTaskMessage", message, false, true);
Expand Down
6 changes: 5 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": 2
"Patch": 3
},
"instanceNameFormat": "Deploying $(vercelProject) to Vercel",
"inputs": [
Expand Down Expand Up @@ -99,6 +99,10 @@
"name": "deploymentURL",
"description": "The URL of the deployment."
},
{
"name": "originalDeploymentURL",
"description": "Original URL of the deployment. Can be used to create your own alias in a separate task."
},
{
"name": "deploymentTaskMessage",
"description": "The message output from the deployment. Can be passed to Vercel Azure DevOps Pull Request Comment Task."
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.2",
"version": "1.6.3",
"publisher": "Vercel",
"public": true,
"targets": [
Expand Down

0 comments on commit da1eda5

Please sign in to comment.