-
Notifications
You must be signed in to change notification settings - Fork 327
Expand file tree
/
Copy pathpost-create.sh
More file actions
executable file
·64 lines (56 loc) · 1.78 KB
/
Copy pathpost-create.sh
File metadata and controls
executable file
·64 lines (56 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# post-create.sh - One-time setup after container creation
set -e
echo "=========================================="
echo "Sourcebot Dev Container: Post-Create Setup"
echo "=========================================="
cd /workspaces/sourcebot
# 1. Initialize git submodules (in case initializeCommand didn't run)
echo ""
echo "[1/5] Initializing git submodules..."
git submodule update --init --recursive
# 2. Build Zoekt and install dependencies (uses Makefile)
echo ""
echo "[2/5] Building Zoekt and installing dependencies..."
make
echo ""
echo "[3/5] Running database migrations..."
yarn dev:prisma:migrate:dev
echo ""
echo "[4/5] Creating default config.json..."
cat > config.json << 'EOF'
{
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
"connections": {
"github": {
"type": "github",
"repos": ["sourcebot-dev/sourcebot"]
}
}
}
EOF
echo ""
echo "[5/5] Configuring Claude Code to skip onboarding..."
# Create or update ~/.claude.json to skip onboarding
if [ -f ~/.claude.json ]; then
# Update existing file
node -e "const fs=require('fs');const cfg=JSON.parse(fs.readFileSync('$HOME/.claude.json','utf8'));cfg.hasCompletedOnboarding=true;fs.writeFileSync('$HOME/.claude.json',JSON.stringify(cfg,null,2));"
else
# Create minimal config with onboarding skipped
cat > ~/.claude.json << 'EOF'
{
"hasCompletedOnboarding": true
}
EOF
fi
echo ""
echo "=========================================="
echo "Post-create setup complete!"
echo ""
echo "To start the development server, run:"
echo " yarn dev"
echo ""
echo "Services will be available at:"
echo " - Web App: http://localhost:3000"
echo " - Zoekt: http://localhost:6070"
echo "=========================================="