Skip to content

Commit

Permalink
🔖 v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Nov 18, 2024
1 parent 647cef8 commit 2c6d7a6
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Change directory to the script's directory
cd "$(dirname $0)"

# Get version from theme.json
version=v$(grep -oP '(?<="version": ")[^"]+' plugin.json)

# Commit changes
git add .
git commit -m "🔖 $version"
git push

# 判断 tag 是否存在
if git rev-parse --quiet --verify $version >/dev/null; then
# 删除本地仓库中的 tag
git tag -d $version
# 删除远程仓库中的 tag
git push origin ":refs/tags/$version"

fi

# 创建新的 tag
git tag $version # Create a tag

# 推送新的 tag 到远程仓库
git push origin --tags
# git archive --format zip --output ../package-$version.zip HEAD # Create a zip archive



0 comments on commit 2c6d7a6

Please sign in to comment.