moshi-opencode-hooks 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/scripts/release.sh +19 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moshi-opencode-hooks",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "OpenCode plugin for Moshi live activity integration",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "scripts": {
19
19
  "build": "bun build index.ts --outdir=dist --target=bun --format=esm",
20
20
  "typecheck": "bun tsc --noEmit",
21
- "publish": "bash scripts/release.sh"
21
+ "release": "bash scripts/release.sh"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/bun": "latest"
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5
+ ROOT_DIR="$(dirname "$SCRIPT_DIR")"
6
+ cd "$ROOT_DIR"
7
+
8
+ current=$(node -p "require('./package.json').version")
9
+ IFS='.' read -r major minor patch <<< "$current"
10
+ next="${major}.${minor}.$((patch + 1))"
11
+
12
+ node -e "const pkg=require('./package.json'); pkg.version='${next}'; require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2)+'\n');"
13
+
14
+ git add package.json
15
+ git commit -m "Bump version to ${next}"
16
+ git tag "v${next}"
17
+ git push && git push origin "v${next}"
18
+
19
+ echo "Released v${next}"