#!/usr/bin/expect -f
set timeout -1
set jump_host "wooo@192.168.0.110"
set target_host "ollama@192.168.0.188"
set repo_dir "/home/ollama/vibework-git"

spawn ssh -J $jump_host $target_host "cd $repo_dir && git reset --hard HEAD && git pull origin main && docker compose pull && docker compose up -d --build db web agent && docker compose exec -T web npx prisma@6.4.1 db push --schema=apps/web/prisma/schema.prisma --skip-generate && docker compose exec -T web npx tsx apps/web/seed.ts"
expect {
  "*assword:*" {
    send "0936223270\r"
    exp_continue
  }
  eof
}
