-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scripts for publishing to VS Code Marketplace #12
Conversation
} | ||
|
||
if (/win32/.test(process.platform)) { | ||
shell.exec(`CertUtil -hashfile ${vsix} SHA256`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't actually foresee us using Windows to publish, but this is just in case.
@@ -66,7 +66,9 @@ runs but that is how you would check locally first. | |||
|
|||
## List of Useful commands | |||
|
|||
### `lerna bootstrap` | |||
_These commands assume that they are executed from the top-level directory. Internally, they delegate to `lerna` to call them on each npm module in the packages directory._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapping each one under npm scripts allows the calling mechanism to be simpler (e.g, since you no longer need to remember which ones to call with --concurrency 1).
@@ -23,7 +23,7 @@ | |||
"compile": "tsc -p ./", | |||
"lint": "tslint --project .", | |||
"watch": "tsc -watch -p .", | |||
"clean": "rm -rf node_modules && rm -rf out", | |||
"clean": "shx rm -rf node_modules && shx rm -rf out", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use shelljs/shx to make the script portable across platforms.
@@ -39,6 +38,32 @@ | |||
"message": 7 | |||
} | |||
} | |||
}, | |||
{ | |||
"taskName": "Lint", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these tasks so that you can now do Cmd + Shift + P in VS Code, type task<space>
and get a list of such task to invoke without going to the command line.
Here is a sample SHA256
I didn't want to commit this yet since we haven't actually published a version 0.1.0 to the Marketplace. |
d392b2b
to
d66a9d0
Compare
@W-4162004@
Also, reorder some of the commands in publish.js so that they make logical sense together. @W-4162004@
This enables us to publish even if nothing has changed since the last time. Useful for situations where we just want to force an increment in version numbers. See https://www.npmjs.com/package/lerna#--force-publish-packages @W-4162004@
106e9b1
to
4f5fe51
Compare
docs/publishing.md
Outdated
|
||
This is a guide for publishing to the Visual Studio Code Marketplace. Most | ||
contributors will not need to worry about publishing. However, it might be | ||
worthwhile familiaring yourself with the steps in case you need to share the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
familiarizing?
docs/publishing.md
Outdated
it to the Visual Studio Code Marketplace. | ||
|
||
It's **crucial** that you publish the .vsix that you had before so that the | ||
SHA256 match. If you were to repackage, the SHA256 woudl be different. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woudl -> would
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of typos. Else, LGTM.
What does this PR do?
Adds scripts for publishing to the VS Code Marketplace.
Usually we would just use
vsce publish
. However, because of vscode-vsce#191, we need to also generate and publish a SHA 256 of each extension for verification.This PR automates most of that – some steps are left as manual for now until we know what to streamline.
What is not in the scope of this PR?
No integration with travis.yml yet.
What issues does this PR fix or reference?
@W-4162004@