diff --git a/package.json b/package.json index d43fde6e..d90a500e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coderoad", - "version": "0.14.4", + "version": "0.14.5", "description": "Play interactive coding tutorials in your editor", "keywords": [ "tutorial", diff --git a/scripts/publish.sh b/scripts/publish.sh index a6d0c8c9..7d588248 100644 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -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 diff --git a/web-app/package.json b/web-app/package.json index 3805c51e..c96838e3 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -1,6 +1,6 @@ { "name": "coderoad-app", - "version": "0.14.4", + "version": "0.14.5", "private": true, "scripts": { "build": "react-app-rewired build",