cloudaxe-opencode/sdks/vscode/script/publish

22 lines
638 B
Text
Raw Permalink Normal View History

2025-07-20 15:33:41 +00:00
#!/usr/bin/env bash
2025-10-22 22:11:51 +00:00
set -euo pipefail
2025-07-20 15:33:41 +00:00
# Get the latest Git tag
latest_tag=$(git tag --sort=committerdate | grep -E '^vscode-v[0-9]+\.[0-9]+\.[0-9]+$' | tail -1)
if [ -z "$latest_tag" ]; then
echo "No tags found"
exit 1
fi
echo "Latest tag: $latest_tag"
2025-10-22 22:11:51 +00:00
version=$(echo "$latest_tag" | sed 's/^vscode-v//')
2025-07-20 15:33:41 +00:00
echo "Latest version: $version"
# package-marketplace
2025-10-22 22:11:51 +00:00
vsce package --no-git-tag-version --no-update-package-json --no-dependencies --skip-license -o dist/opencode.vsix "$version"
2025-07-20 15:33:41 +00:00
# publish-marketplace
2025-07-20 17:17:51 +00:00
vsce publish --packagePath dist/opencode.vsix
2025-07-20 17:07:48 +00:00
# publish-openvsx
2025-10-22 22:11:51 +00:00
npx ovsx publish dist/opencode.vsix -p "$OPENVSX_TOKEN"