Skip to content

Commit 1fd822c

Browse files
Fix Extensions (#565)
Co-authored-by: Filip Troníček <filip@gitpod.io> Co-authored-by: Filip Troníček <filip.tronicek@seznam.cz>
1 parent c6cd4aa commit 1fd822c

File tree

4 files changed

+164
-78
lines changed

4 files changed

+164
-78
lines changed

.github/workflows/validate-pr.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ jobs:
1717
- uses: actions/setup-node@v3.1.1
1818
with:
1919
node-version: "14.x"
20-
- run: npm i
21-
- run: npm i -g vsce
20+
- run: npm install
21+
- run: npm install --global vsce
2222
- uses: actions/setup-python@v3
2323
with:
2424
python-version: "3.8"
25-
- run: npm install
2625
- run: EXTENSIONS=$(node diff-extensions) node publish-extensions
2726
env:
2827
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,16 @@ If a `custom` property is provided, then every command from the array is execute
7878

7979
See all `ovsx` CLI options [here](https://github.com/eclipse/openvsx/blob/master/cli/README.md).
8080

81+
## Environment Variables
82+
Custom commands such as `prepublish` and the ones inside the `custom`-array receive a few environment variables
83+
in order to perform advanced tasks such as executing operations based on the extension version.
84+
85+
Following environment variables are available:
86+
- `EXTENSION_ID`: the extension ID, e.g. `rebornix.ruby`
87+
- `EXTENSION_PUBLISHER`: the extension publisher, e.g. `rebornix`
88+
- `EXTENSION_NAME`: the extension name, e.g. `ruby`
89+
- `VERSION`: the version of the extension to publish, e.g. `0.1.0`
90+
- `MS_VERSION`: the latest version of the extension on MS marketplace, e.g. `0.1.0`
91+
- `OVSX_VERSION`: the latest version of the extension on Open VSX, e.g. `0.1.0`
92+
8193
[publish-extensions-job]: https://github.com/open-vsx/publish-extensions/blob/master/.github/workflows/publish-extensions.yml

0 commit comments

Comments
 (0)