Skip to content

Commit

Permalink
sync with the other concurrent build better
Browse files Browse the repository at this point in the history
  • Loading branch information
odilitime committed Feb 28, 2025
1 parent 6297124 commit 9037d27
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ cat << "EOF"
EOF

# 2 seconds delay
# 2 seconds delay to read the message above
for i in {1..5}; do
echo -n "."
sleep 0.4
Expand All @@ -74,7 +74,7 @@ if [ ! -d "$PACKAGES_DIR" ]; then
fi

# List of working folders to watch (relative to $PACKAGES_DIR)
WORKING_FOLDERS=("client-direct") # Core is handled separately
WORKING_FOLDERS=() # Core is handled separately

# Initialize an array to hold package-specific commands
COMMANDS=()
Expand Down Expand Up @@ -112,8 +112,10 @@ if [ -d "./agent" ]; then
for FOLDER in "${WORKING_FOLDERS[@]}"; do
WATCH_PATHS+=("--watch './packages/$FOLDER/dist'")
done

COMMANDS+=("nodemon ${WATCH_PATHS[@]} -e js,json,map --delay 2 --exec 'pnpm --dir agent dev -- $*'")
# the initial sleep helps newer machines (ryzen 7xxx+) cycle faster
# older machine won't need it but they will be delayed 1 sec
# favoring newer machine for development
COMMANDS+=("echo 'boot elizaOS' && sleep 1 && echo 'starting nodemon' && nodemon --verbose ${WATCH_PATHS[@]} -e js,json,map --delay 2 --exec 'pnpm --dir agent dev -- $*'")
else
echo "Warning: 'agent' directory not found."
fi
Expand Down

0 comments on commit 9037d27

Please sign in to comment.