#!/usr/bin/env bash
set -eu
# Run from the scenario checkout, with Vite+'s global bin directory first on PATH.
policy_dir=$(mktemp -d)
printf 'min-release-age=3\n' > "$policy_dir/npmrc"
export npm_config_userconfig="$policy_dir/npmrc"
export T3CODE_DEV_SEED=0
export T3_SCENARIO_INHERIT_ENV=npm_config_userconfig,T3CODE_DEV_SEED
vp i -g @opencode/cli
vp run scenarios:prove scripts/scenarios/vite-release-age.e2e.ts \
  --base fb2e5a0128b8c688dd632b4aba35bbe513bd2f47 \
  --head 3663ade65466404fc6c81817d579718cb2a97d6e \
  --upload-command 'ghdrop upload'
