deploy builtin tools

This commit is contained in:
Chris Wanstrath 2026-02-09 20:59:10 -08:00
parent 8f37274cee
commit d89a58c0ab

View File

@ -11,7 +11,30 @@ source "$ROOT_DIR/scripts/config.sh"
git push origin main git push origin main
# SSH to target and update # SSH to target and update
ssh "$HOST" "cd $DEST && git pull origin main && bun run build && sudo systemctl restart toes.service" ssh "$HOST" "cd $DEST && git pull origin main && bun run build"
# Sync default apps/tools from repo to APPS_DIR
echo "=> Syncing default apps..."
ssh "$HOST" bash -s "$DEST" "$APPS_DIR" <<'SCRIPT'
DEST="$1"
APPS_DIR="$2"
for app_dir in "$DEST"/apps/*/; do
app=$(basename "$app_dir")
for version_dir in "$app_dir"*/; do
[ -d "$version_dir" ] || continue
version=$(basename "$version_dir")
[ -f "$version_dir/package.json" ] || continue
target="$APPS_DIR/$app/$version"
mkdir -p "$target"
cp -a "$version_dir"/. "$target"/
rm -f "$APPS_DIR/$app/current"
echo " $app/$version"
(cd "$target" && bun install --frozen-lockfile 2>/dev/null || bun install)
done
done
SCRIPT
ssh "$HOST" "sudo systemctl restart toes.service"
echo "=> Deployed to $HOST" echo "=> Deployed to $HOST"
echo "=> Visit $URL" echo "=> Visit $URL"