Last active
July 3, 2020 14:24
-
-
Save notpushkin/7fba4e2035f2c25bb04dfb9fb51a30c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TOKEN="" # get yours at https://open-vsx.org/user-settings/tokens | |
temp_file="$(mktemp)" | |
namespace="${1?usage\: $(basename $0) NAMESPACE PACKAGE_NAME}" | |
package_name="${2?usage\: $(basename $0) NAMESPACE PACKAGE_NAME}" | |
version="$(curl "https://vscode-marketplace-api.herokuapp.com/${namespace}/${package_name}" | jq -r .Version)" | |
echo "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${namespace}/vsextensions/${package_name}/${version}/vspackage" | |
curl --compressed "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${namespace}/vsextensions/${package_name}/${version}/vspackage" > "${temp_file}" | |
npx ovsx create-namespace -p "${TOKEN}" "${namespace}" | |
npx ovsx publish -p "${TOKEN}" "${temp_file}" | |
rm "${temp_file}" | |
echo "Woo! Your extension is now available at" | |
echo "" | |
echo " https://open-vsx.org/extension/${namespace}/${package_name}" | |
echo "" | |
echo "Don't forget to let the author now that you have uploaded it." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment