File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1313# Start with base workspace config
1414cp pnpm-workspace.base.yaml pnpm-workspace.yaml
1515
16- # If AGENT_PACKAGE_LOCATION is set, add the override
16+ # If AGENT_PACKAGE_LOCATION is set, add the override and build the agent
1717if [ -n " $AGENT_PACKAGE_LOCATION " ]; then
1818 echo " ✓ Using local @posthog/agent from: $AGENT_PACKAGE_LOCATION "
1919 cat >> pnpm-workspace.yaml << EOF
2020
2121overrides:
2222 "@posthog/agent": $AGENT_PACKAGE_LOCATION
2323EOF
24+
25+ # Extract the path from file:../agent format
26+ AGENT_PATH=" ${AGENT_PACKAGE_LOCATION# file: } "
27+
28+ if [ -d " $AGENT_PATH " ]; then
29+ echo " 📦 Building @posthog/agent..."
30+ (cd " $AGENT_PATH " && pnpm install && pnpm build)
31+ echo " ✓ @posthog/agent built successfully"
32+ else
33+ echo " ⚠️ Warning: Agent path $AGENT_PATH does not exist"
34+ fi
2435else
2536 echo " ✓ Using production @posthog/agent package"
2637fi
2738
2839echo " ✓ Workspace configured"
29- echo " "
30- echo " Now run: pnpm install"
You can’t perform that action at this time.
0 commit comments