mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-18 10:31:30 +08:00
feat: upgrade migration system — versioned fix scripts for broken state
Adds gstack-upgrade/migrations/ directory with version-keyed bash scripts that run automatically during /gstack-upgrade (Step 4.75, after ./setup). Each script is idempotent and handles state fixes that setup alone can't cover. First migration: v0.15.2.0.sh runs gstack-relink to fix stale directory symlinks from pre-v0.15.2.0 installs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
20
gstack-upgrade/migrations/v0.15.2.0.sh
Executable file
20
gstack-upgrade/migrations/v0.15.2.0.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Migration: v0.15.2.0 — Fix skill directory structure for unprefixed discovery
|
||||
#
|
||||
# What changed: setup now creates real directories with SKILL.md symlinks
|
||||
# inside instead of directory symlinks. The old pattern (qa -> gstack/qa)
|
||||
# caused Claude Code to auto-prefix skills as "gstack-qa" even with
|
||||
# --no-prefix, because Claude sees the symlink target's parent dir name.
|
||||
#
|
||||
# What this does: runs gstack-relink to recreate all skill entries using
|
||||
# the new real-directory pattern. Idempotent — safe to run multiple times.
|
||||
#
|
||||
# Affected: users who installed gstack before v0.15.2.0 with --no-prefix
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
|
||||
if [ -x "$SCRIPT_DIR/bin/gstack-relink" ]; then
|
||||
echo " [v0.15.2.0] Fixing skill directory structure..."
|
||||
"$SCRIPT_DIR/bin/gstack-relink" 2>/dev/null || true
|
||||
fi
|
||||
Reference in New Issue
Block a user