mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-18 03:02:56 +00:00
chore: add install-worktree-deps.sh script for dependency installation
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
{
|
{
|
||||||
"worktree": {
|
"worktree": {
|
||||||
"baseRef": "fresh",
|
"baseRef": "fresh"
|
||||||
"symlinkDirectories": ["node_modules"]
|
|
||||||
},
|
},
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"PostToolUse": [
|
"PostToolUse": [
|
||||||
{
|
{
|
||||||
"matcher": "EnterWorktree",
|
"matcher": "EnterWorktree",
|
||||||
"hooks": [
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "\"$CLAUDE_PROJECT_DIR/scripts/install-worktree-deps.sh\""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"command": "\"$CLAUDE_PROJECT_DIR/scripts/assign-worktree-port.sh\""
|
"command": "\"$CLAUDE_PROJECT_DIR/scripts/assign-worktree-port.sh\""
|
||||||
|
|||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
PAYLOAD=$(cat)
|
||||||
|
WORKTREE_PATH=$(echo "$PAYLOAD" | jq -r '.tool_response.worktreePath // empty')
|
||||||
|
|
||||||
|
if [ -z "$WORKTREE_PATH" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Turbopack refuses to resolve through anything outside its detected
|
||||||
|
# workspace root, so a symlinked node_modules (whole dir or per-entry)
|
||||||
|
# doesn't work for apps/dokploy. A real `pnpm install` is required, but
|
||||||
|
# since pnpm's global content-addressable store is already warm, this
|
||||||
|
# only links locally — no network fetch, a few seconds.
|
||||||
|
cd "$WORKTREE_PATH"
|
||||||
|
pnpm install --prefer-offline
|
||||||
Reference in New Issue
Block a user