mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-17 09:41:28 +08:00
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>
21 lines
854 B
Bash
Executable File
21 lines
854 B
Bash
Executable File
#!/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
|