Skip to content

Commit 06e8910

Browse files
committed
Updated to also run on Linux as well as documented for use on Pipelines
1 parent d357757 commit 06e8910

File tree

6 files changed

+44
-18
lines changed

6 files changed

+44
-18
lines changed

.github/workflows/blank.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717

1818
- name: Patch vss-extension.json
1919
uses: onlyutkarsh/[email protected]
2020
with:
2121
files: vss-extension.json
22-
patch-syntax: = /version => "3.1.${{ github.run_number }}"
22+
patch-syntax: = /version => "4.0.${{ github.run_number }}"
2323
fail-if-no-files-patched: true
2424

2525
- name: Patch task.json
2626
uses: onlyutkarsh/[email protected]
2727
with:
2828
files: ElmahIoUploadSourceMap/task.json
2929
patch-syntax: |
30-
= /version/Major => "3"
31-
= /version/Minor => "1"
30+
= /version/Major => "4"
31+
= /version/Minor => "0"
3232
= /version/Patch => "${{ github.run_number }}"
3333
fail-if-no-files-patched: true
3434

@@ -45,8 +45,8 @@ jobs:
4545
env:
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
4747
with:
48-
tag_name: 3.1.${{ github.run_number }}
49-
release_name: Release 3.1.${{ github.run_number }}
48+
tag_name: 4.0.${{ github.run_number }}
49+
release_name: Release 4.0.${{ github.run_number }}
5050
draft: false
5151

5252
- name: Upload vsix
@@ -56,6 +56,6 @@ jobs:
5656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5757
with:
5858
upload_url: ${{ steps.create_release.outputs.upload_url }}
59-
asset_path: ./elmahio.elmah-io-upload-source-map-3.1.${{ github.run_number }}.vsix
60-
asset_name: elmahio.elmah-io-upload-source-map-3.1.${{ github.run_number }}.vsix
59+
asset_path: ./elmahio.elmah-io-upload-source-map-4.0.${{ github.run_number }}.vsix
60+
asset_name: elmahio.elmah-io-upload-source-map-4.0.${{ github.run_number }}.vsix
6161
asset_content_type: application/zip

ElmahIoUploadSourceMap/task.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
],
1212
"author": "elmah.io",
1313
"version": {
14-
"Major": 3,
14+
"Major": 4,
1515
"Minor": 0,
16-
"Patch": 19
16+
"Patch": 0
1717
},
1818
"demands": [],
1919
"minimumAgentVersion": "1.104.0",
@@ -58,7 +58,13 @@
5858
"instanceNameFormat": "elmah.io Upload Source Map for $(path)",
5959
"execution": {
6060
"PowerShell3": {
61-
"target": "upload.ps1"
61+
"target": "upload.ps1",
62+
"platforms": [
63+
"windows",
64+
"linux",
65+
"darwin"
66+
],
67+
"pwsh": true
6268
}
6369
}
6470
}

README.md

+25-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,36 @@ This extension is able to upload a source map and a minified JavaScript file to
44

55
## Usage
66

7-
1. Go to the [elmah.io Upload Source Map](https://marketplace.visualstudio.com/items?itemName=elmahio.elmah-io-upload-source-map) extension on the Azure DevOps Marketplace and click the _Get it free_ button:
7+
Go to the [elmah.io Upload Source Map](https://marketplace.visualstudio.com/items?itemName=elmahio.elmah-io-upload-source-map) extension on the Azure DevOps Marketplace and click the _Get it free_ button:
88

99
![Install the extension](images/marketplace_get_it_free.png)
1010

11-
2. Select your organization and click the *Install* button:
11+
Select your organization and click the *Install* button:
1212

1313
![Select organization](images/marketplace_select_organization.png)
1414

15-
3. Go to your Azure DevOps project and add the *elmah.io Upload Source Map* task. Fill in all fields as shown here:
15+
The task supports both Pipelines and Releases. No matter which approach you choose, you will need to replace `API_KEY` with an API key ([Where is my API key?](https://docs.elmah.io/where-is-my-api-key/)) with permission ([How to configure API key permissions](https://docs.elmah.io/how-to-configure-api-key-permissions/)) to upload source maps. Replace `LOG_ID` with the ID ([Where is my log ID?](https://docs.elmah.io/where-is-my-log-id/)) of the log the source map belongs to. **Path** must contain the relative path to the minified JavaScript. **Source Map File** and **Minified JavaScript File** must contain a path to the generated source map and minified JavaScript file.
1616

17-
![Add the task](images/release_pipeline_task.png)
17+
### Pipelines
1818

19-
You will need to replace `API_KEY` with an API key ([Where is my API key?](https://docs.elmah.io/where-is-my-api-key/)) with permission ([How to configure API key permissions](https://docs.elmah.io/how-to-configure-api-key-permissions/)) to upload source maps and `LOG_ID` with the ID ([Where is my log ID?](https://docs.elmah.io/where-is-my-log-id/)) of the log the source map belongs to. **Path** must contain the relative path to the minified JavaScript. **Source Map File** and **Minified JavaScript File** must contain a path to the generated source map and minified JavaScript file.
19+
Go to your Azure DevOps Pipeline configuration and add the *elmah.io Upload Source Map* task. Fill in the fields as shown here:
20+
21+
![Add the task](images/pipeline_task.png)
22+
23+
When clicking the *Add* button, YAML code will be added to your configuration looking similar to this:
24+
25+
```yaml
26+
- task: ElmahIoUploadSourceMap@4
27+
inputs:
28+
apiKey: 'API_KEY'
29+
logId: 'LOG_ID'
30+
path: '/bundles/sharedbundle.min.js'
31+
sourceMap: '$(System.DefaultWorkingDirectory)/myproject/drop/bundles/sharedbundle.map'
32+
minifiedJavaScript: '$(System.DefaultWorkingDirectory)/myproject/drop/bundles/sharedbundle.min.js'
33+
```
34+
35+
### Releases
36+
37+
Go to your Azure DevOps Release configuration and add the *elmah.io Upload Source Map* task. Fill in all fields as shown here:
38+
39+
![Add the task](images/release_pipeline_task.png)

images/pipeline_task.png

46.2 KB
Loading

images/release_pipeline_task.png

25.2 KB
Loading

vss-extension.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifestVersion": 1,
33
"id": "elmah-io-upload-source-map",
44
"name": "elmah.io Upload Source Map",
5-
"version": "3.0.19",
5+
"version": "4.0.0",
66
"publisher": "elmahio",
77
"tags": [
88
"Error",
@@ -56,7 +56,7 @@
5656
},
5757
"description": "Tasks for uploading source maps to elmah.io from Azure DevOps.",
5858
"categories": [
59-
"Azure Pipelines"
59+
"Build and release"
6060
],
6161
"icons": {
6262
"default": "extension-icon.png"

0 commit comments

Comments
 (0)