mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
9f3dd0bf2b
* feat: add windmill-ee-private worktree support to workmux Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add EE worktree cleanup on remove and parent-dir lookup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
703 B
Bash
Executable File
21 lines
703 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Remove the matching windmill-ee-private worktree if one exists
|
|
wt_basename=$(basename "$(pwd)")
|
|
|
|
# Check parent directory first (sibling to worktree root), then fall back to home
|
|
parent_dir="$(cd "$(pwd)/.." && pwd)"
|
|
if [ -d "${parent_dir}/windmill-ee-private" ]; then
|
|
ee_repo="${parent_dir}/windmill-ee-private"
|
|
else
|
|
ee_repo="${HOME}/windmill-ee-private"
|
|
fi
|
|
|
|
ee_worktree_dir="${ee_repo}__worktrees/${wt_basename}"
|
|
if [ -d "$ee_worktree_dir" ]; then
|
|
git -C "$ee_repo" worktree remove "$ee_worktree_dir" --force 2>/dev/null \
|
|
&& echo "Removed EE worktree at $ee_worktree_dir" \
|
|
|| echo "Warning: Could not remove EE worktree at $ee_worktree_dir"
|
|
fi
|