mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-17 02:25:57 +00:00
fix: worktrunk setup
This commit is contained in:
@@ -28,4 +28,6 @@ wt config shell install
|
||||
|
||||
## Hooks
|
||||
|
||||
- **on_create**: Runs `setup-worktree.sh` which installs dependencies and copies env files
|
||||
Hooks are configured in `.config/wt.toml`:
|
||||
|
||||
- **post-create**: Runs `bun install` and copies env files from the main worktree
|
||||
4
.config/wt.toml
Normal file
4
.config/wt.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[post-create]
|
||||
install = "bun install"
|
||||
env-server = "cp {{ repo_root }}/apps/server/.env.development apps/server/.env.development"
|
||||
env-agent = "cp {{ repo_root }}/apps/agent/.env.development apps/agent/.env.development"
|
||||
@@ -1,2 +0,0 @@
|
||||
[hooks]
|
||||
on_create = [".worktrunk/setup-worktree.sh"]
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Setting up worktree..."
|
||||
|
||||
# Install dependencies
|
||||
bun install
|
||||
|
||||
# Get the main worktree (trunk) path
|
||||
TRUNK=$(git worktree list | head -1 | awk '{print $1}')
|
||||
|
||||
# Copy env files from trunk if they exist
|
||||
if [ -f "$TRUNK/apps/server/.env.development" ]; then
|
||||
cp "$TRUNK/apps/server/.env.development" apps/server/.env.development
|
||||
echo "✓ Copied apps/server/.env.development"
|
||||
fi
|
||||
|
||||
if [ -f "$TRUNK/apps/agent/.env.development" ]; then
|
||||
cp "$TRUNK/apps/agent/.env.development" apps/agent/.env.development
|
||||
echo "✓ Copied apps/agent/.env.development"
|
||||
fi
|
||||
|
||||
echo "Worktree setup complete!"
|
||||
Reference in New Issue
Block a user