fix: Worktree scripts use $(pwd) for project root
Scripts now correctly determine project root from current working
directory instead of calculating relative to script location.
This fixes the issue when scripts are called via ${CLAUDE_PLUGIN_ROOT}.
Also adds CLAUDE.md and CHANGELOG.md for development guidance.
Bumps version to 1.0.3.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ab",
|
||||
"description": "Auto-Build: Spec-driven build orchestration with worktree isolation and session memory",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"author": {
|
||||
"name": "ROA2WEB Team"
|
||||
}
|
||||
|
||||
@@ -7,9 +7,8 @@ set -e
|
||||
|
||||
FEATURE_NAME="$1"
|
||||
|
||||
# Get project root (parent of .auto-build)
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
# Get project root from current working directory (where Claude Code is running)
|
||||
PROJECT_ROOT="$(pwd)"
|
||||
PROJECT_NAME=$(basename "$PROJECT_ROOT")
|
||||
WORKTREES_DIR="$(dirname "$PROJECT_ROOT")/ab-worktrees"
|
||||
|
||||
@@ -104,5 +103,5 @@ else
|
||||
|
||||
echo ""
|
||||
echo "To cleanup a specific worktree:"
|
||||
echo " bash .auto-build/scripts/worktree-cleanup.sh <feature-name>"
|
||||
echo " /ab:worktree cleanup <feature-name>"
|
||||
fi
|
||||
|
||||
@@ -12,9 +12,9 @@ if [ -z "$FEATURE_NAME" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get project root (parent of .auto-build)
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
# Get project root from current working directory (where Claude Code is running)
|
||||
# Note: This script is called from ${CLAUDE_PLUGIN_ROOT}/scripts/ but operates on the project
|
||||
PROJECT_ROOT="$(pwd)"
|
||||
PROJECT_NAME=$(basename "$PROJECT_ROOT")
|
||||
|
||||
# Define paths
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Get project root (parent of .auto-build)
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
# Get project root from current working directory (where Claude Code is running)
|
||||
PROJECT_ROOT="$(pwd)"
|
||||
|
||||
echo "========================================"
|
||||
echo " Git Worktrees"
|
||||
|
||||
@@ -6,9 +6,8 @@ set -e
|
||||
|
||||
FEATURE_NAME="$1"
|
||||
|
||||
# Get project root (parent of .auto-build)
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
# Get project root from current working directory (where Claude Code is running)
|
||||
PROJECT_ROOT="$(pwd)"
|
||||
PROJECT_NAME=$(basename "$PROJECT_ROOT")
|
||||
WORKTREES_DIR="$(dirname "$PROJECT_ROOT")/ab-worktrees"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user