File tree Expand file tree Collapse file tree 1 file changed +3
-34
lines changed
Expand file tree Collapse file tree 1 file changed +3
-34
lines changed Original file line number Diff line number Diff line change 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
You canβt perform that action at this time.
0 commit comments