mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-01 19:25:10 +02:00
fix: gstack-team-init detects and removes vendored copies (#848)
* fix: gstack-team-init detects and removes vendored copies in team mode When running gstack-team-init inside a repo with a vendored .claude/skills/gstack/, the script now auto-detects and removes it: git rm --cached, add to .gitignore, rm -rf. Also adds team_mode config key to setup --team/--no-team, and makes gstack-upgrade Step 4.5 team-mode aware (remove instead of sync). Includes 5 new integration tests for the vendored copy migration. * chore: bump version and changelog (v0.15.14.0) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,26 @@ REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
CLAUDE_MD="$REPO_ROOT/CLAUDE.md"
|
||||
GENERATED=()
|
||||
|
||||
# ── Migrate vendored copy if present ──────────────────────────
|
||||
|
||||
if [ -d "$REPO_ROOT/.claude/skills/gstack" ] && [ ! -L "$REPO_ROOT/.claude/skills/gstack" ]; then
|
||||
if [ -f "$REPO_ROOT/.claude/skills/gstack/VERSION" ] || [ -d "$REPO_ROOT/.claude/skills/gstack/.git" ]; then
|
||||
echo " Found vendored gstack copy at $REPO_ROOT/.claude/skills/gstack"
|
||||
echo " Team mode uses the global install — removing vendored copy..."
|
||||
( cd "$REPO_ROOT" && git rm -r --cached .claude/skills/gstack/ 2>/dev/null ) || true
|
||||
if [ -f "$REPO_ROOT/.gitignore" ]; then
|
||||
if ! grep -qF '.claude/skills/gstack/' "$REPO_ROOT/.gitignore" 2>/dev/null; then
|
||||
echo '.claude/skills/gstack/' >> "$REPO_ROOT/.gitignore"
|
||||
fi
|
||||
else
|
||||
echo '.claude/skills/gstack/' > "$REPO_ROOT/.gitignore"
|
||||
fi
|
||||
rm -rf "$REPO_ROOT/.claude/skills/gstack"
|
||||
GENERATED+=(".gitignore")
|
||||
echo " Removed vendored copy and added .claude/skills/gstack/ to .gitignore"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ── CLAUDE.md snippet ──────────────────────────────────────────
|
||||
|
||||
if [ "$MODE" = "optional" ]; then
|
||||
|
||||
Reference in New Issue
Block a user