Skip to content

Add ovsx publish script #507

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

Merged
merged 2 commits into from
Aug 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coderoad",
"version": "0.14.4",
"version": "0.14.5",
"description": "Play interactive coding tutorials in your editor",
"keywords": [
"tutorial",
Expand Down
18 changes: 15 additions & 3 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,28 @@
# docs: https://code.visualstudio.com/api/working-with-extensions/publishing-extension
# run: sh scripts/publish.sh {VSCE_KEY}

VSCE_KEY=$1
PACKAGE_VERSION=$(grep 'version' package.json \
| cut -d '"' -f4)
RELEASES_FOLDER=releases
OUTPUT_FILE=coderoad-$PACKAGE_VERSION.vsix
RAW_PATH=https://github.com/coderoad/coderoad-vscode/blob/master

if [[ -z "$VSCE_KEY" ]] && [[ -z "$OVSX_KEY" ]]; then
echo "VSCE_KEY or OVSX_KEY is required"
exit 1;
fi

# comment out until confident in testing process
git tag -a v$PACKAGE_VERSION -m "Releasing version v$PACKAGE_VERSION"
git push origin v$PACKAGE_VERSION

# send to VSCode Marketplace via
vsce publish -p $VSCE_KEY --packagePath ./$RELEASES_FOLDER/$OUTPUT_FILE --baseContentUrl $RAW_PATH --baseImagesUrl $RAW_PATH
# send to VSCode Marketplace
if ! [[ -z "$VSCE_KEY" ]]; then
echo "publishing to vscode marketplace..."
npx vsce publish -p $VSCE_KEY --packagePath ./$RELEASES_FOLDER/$OUTPUT_FILE --baseContentUrl $RAW_PATH --baseImagesUrl $RAW_PATH
fi
# send to Open-VSX Marketplace (https://github.com/eclipse/openvsx/wiki/Publishing-Extensions)
if ! [[ -z "$OVSX_KEY" ]]; then
echo "publishing to open-vsx marketplace..."
npx ovsx publish -p $OVSX_KEY ./$RELEASES_FOLDER/$OUTPUT_FILE --baseContentUrl $RAW_PATH --baseImagesUrl $RAW_PATH"
fi
2 changes: 1 addition & 1 deletion web-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coderoad-app",
"version": "0.14.4",
"version": "0.14.5",
"private": true,
"scripts": {
"build": "react-app-rewired build",
Expand Down