File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ if [ $# -ne 1 ]; then
5+ echo " Usage: ./scripts/release.sh <version>"
6+ echo " Example: ./scripts/release.sh 0.2.0"
7+ exit 1
8+ fi
9+
10+ VERSION=" $1 "
11+ TAG=" v${VERSION} "
12+
13+ if git rev-parse " $TAG " > /dev/null 2>&1 ; then
14+ echo " Error: tag $TAG already exists"
15+ exit 1
16+ fi
17+
18+ if [ -n " $( git status --porcelain) " ]; then
19+ echo " Error: working directory is not clean"
20+ exit 1
21+ fi
22+
23+ echo " Releasing $TAG ..."
24+
25+ sed -i ' ' " s/\" version\" : \" [^\" ]*\" /\" version\" : \" ${VERSION} \" /" .claude-plugin/plugin.json
26+ sed -i ' ' " s/\" version\" : \" [^\" ]*\" /\" version\" : \" ${VERSION} \" /" .claude-plugin/marketplace.json
27+ sed -i ' ' " s/VERSION=\" [^\" ]*\" /VERSION=\" ${VERSION} \" /" scripts/on-event.sh
28+
29+ echo " Updated versions:"
30+ grep ' "version"' .claude-plugin/plugin.json .claude-plugin/marketplace.json
31+ grep ' VERSION=' scripts/on-event.sh
32+
33+ git add .claude-plugin/plugin.json .claude-plugin/marketplace.json scripts/on-event.sh
34+ git commit -m " release: ${TAG} "
35+ git tag " $TAG "
36+ git push
37+ git push --tags
38+
39+ echo " Done. GoReleaser will build and publish binaries."
You can’t perform that action at this time.
0 commit comments