Skip to content

Commit 78e4d08

Browse files
committed
update publish.sh
1 parent 380cd48 commit 78e4d08

File tree

1 file changed

+3
-34
lines changed

1 file changed

+3
-34
lines changed

β€Žpublish.shβ€Ž

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,7 @@
11
#!/bin/bash
22

33
# Simple publish script for xmake-vscode extension
4-
VERSION=${1:-""}
5-
6-
if [ -z "$VERSION" ]; then
7-
echo "Usage: $0 <version>"
8-
echo "Example: $0 2.4.2"
9-
exit 1
10-
fi
11-
12-
echo "πŸš€ Publishing extension $VERSION..."
13-
14-
# Check git status
15-
if [ -n "$(git status --porcelain)" ]; then
16-
echo "❌ Git working directory not clean. Please commit or stash changes first."
17-
git status
18-
exit 1
19-
fi
20-
21-
# Update package.json version directly
22-
echo "πŸ“ Updating package.json version to $VERSION..."
23-
sed -i '' "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json
24-
25-
# Publish the extension
26-
echo "πŸ“€ Publishing extension as version $VERSION..."
27-
vsce publish $VERSION
28-
29-
# Create and push git tag
30-
echo "🏷️ Creating git tag v$VERSION..."
31-
git add package.json
32-
git commit -m "Bump version to $VERSION"
33-
git tag v$VERSION
34-
git push origin v$VERSION
35-
36-
echo "βœ… Extension published successfully as version $VERSION!"
37-
echo "πŸ”— Tag pushed: v$VERSION"
4+
echo "πŸš€ Publishing extension $1..."
5+
vsce publish $1
6+
echo "βœ… Published!"
387

0 commit comments

Comments
Β (0)