#!/usr/bin/env bash
# Compatibility entrypoint for the complete, validated VPS suite release.
set -euo pipefail
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
publisher="${script_dir}/../../deploy/publish.ps1"
if [[ ! -f "$publisher" ]]; then
  printf 'The complete release publisher is missing: %s\n' "$publisher" >&2
  printf 'Restore the sibling deploy directory from the Cyberelf release source.\n' >&2
  exit 2
fi
if [[ "${1:-}" == "--check" ]]; then
  printf 'Validated suite publisher: %s\n' "$publisher"
  exit 0
fi
# This retained entrypoint is for the Windows/WSL operator environment.
# The publisher packages the full suite and verifies every public asset.
exec powershell.exe -NoProfile -File "$(wslpath -w "$publisher")" -SshAlias "${1:-vps2}"
