Skip to content

Commit ce560dd

Browse files
committedJan 16, 2021
feat: allow to package without custom output path
1 parent 49e6f8c commit ce560dd

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Use `semantic-release-vsce` as part of `verifyConditions` and `publish`.
2626
],
2727
"prepare": {
2828
"path": "semantic-release-vsce",
29-
"packageVsix": "your-extension.vsix"
29+
"packageVsix": true
3030
},
3131
"publish": [
3232
"semantic-release-vsce",
3333
{
3434
"path": "@semantic-release/github",
35-
"assets": "your-extension.vsix"
35+
"assets": "*.vsix"
3636
}
3737
]
3838
},
@@ -43,7 +43,7 @@ Use `semantic-release-vsce` as part of `verifyConditions` and `publish`.
4343
}
4444
```
4545

46-
If `packageVsix` is set, will also generate a .vsix file at the set file path after publishing.
46+
If `packageVsix` is set, will also generate a .vsix file at the set file path after publishing. If is a string, it will be used as value for `--out` of `vsce package`.
4747
It is recommended to upload this to your GitHub release page so your users can easily rollback to an earlier version if a version ever introduces a bad bug.
4848

4949
If `yarn` is set to `true`, will use `--yarn`option for `vsce package` and `vsce publish`.

‎lib/prepare.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ module.exports = async (version, packageVsix, yarn, logger) => {
77
if (packageVsix) {
88
logger.log('Packaging version %s as .vsix', version);
99

10-
let options = ['package', '--out', packageVsix]
11-
10+
let options = ['package'];
11+
12+
if (typeof packageVsix === "string") {
13+
options.concat(['--out', packageVsix])
14+
}
15+
1216
if (yarn) {
1317
options.push('--yarn')
1418
}

0 commit comments

Comments
 (0)
Please sign in to comment.