unoverse 0.1.82 → 0.1.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -429,11 +429,17 @@ EOF
429
429
  # install.yml creates. The remedy was to know that `unoverse deploy init` exists, which
430
430
  # is exactly the kind of knowledge this CLI is supposed to remove: deploy owns the whole
431
431
  # journey, so it asks the server what it is and picks the right playbook itself.
432
+ # THE MARKER IS "SETUP FINISHED", NOT "A DIRECTORY EXISTS". Testing for /opt/gravity
433
+ # looked right and was not: install.yml creates that directory as its seventh task, so a
434
+ # first-time setup that then FAILED at the database step still left it behind. The next
435
+ # deploy saw it, decided the server was ready, shipped images onto a database that had
436
+ # never been migrated, and reported success. The stamp is written only after install,
437
+ # database and verify have all passed, so an interrupted setup resumes as a setup.
432
438
  if [ -z "$subcommand" ]; then
433
439
  if ! ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 \
434
- "$deploy_user@$deploy_host" 'test -d /opt/gravity' >/dev/null 2>&1; then
440
+ "$deploy_user@$deploy_host" 'test -f /opt/gravity/.setup-complete' >/dev/null 2>&1; then
435
441
  echo ""
436
- info "New server. Running the full first-time setup ${DIM}(install, database, verify)${NC}"
442
+ info "This server's setup has not finished. Running it ${DIM}(install, database, verify)${NC}"
437
443
  subcommand="init"
438
444
  fi
439
445
  fi
@@ -478,6 +484,9 @@ EOF
478
484
  "$ansible_dir/playbooks/test-connectivity.yml" \
479
485
  -e "universe_root=$ROOT" \
480
486
  -e "env_file=$env_prod" || { rm -f "$tmp_inventory"; fail "verification failed — inspect and re-run: unoverse deploy test"; exit 1; }
487
+ # Only now. Every step passed, so the next deploy can safely be an image push.
488
+ ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 \
489
+ "$deploy_user@$deploy_host" 'touch /opt/gravity/.setup-complete' >/dev/null 2>&1
481
490
  echo ""
482
491
  ok "Your universe is up. From now on, deploys are just: unoverse deploy"
483
492
  info "Keeping it? Harden the VM when you're ready: unoverse deploy harden"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unoverse",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
4
4
  "description": "The Unoverse front door — create a Studio project, a universe, or a client app, and launch Studio.",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "type": "module",