#!/usr/bin/env bash
set -euo pipefail
# Run from a current origin/main worktree with dependencies installed.
# Place cleanup-published-submodule-tag.e2e.ts in scripts/scenarios and clock.mjs beside this script.
export SCENARIO_SCRATCH="$(mktemp -d)"
export SCENARIO_CLOCK_FILE="$SCENARIO_SCRATCH/clock-offset"
export NODE_OPTIONS="--import=$(cd -- "$(dirname -- "$0")" && pwd)/clock.mjs"
export T3_SCENARIO_INHERIT_ENV='T3CODE_DEV_SEED,SCENARIO_*,NODE_OPTIONS'
export T3CODE_DEV_SEED=0
vp run scenarios:prove scripts/scenarios/cleanup-published-submodule-tag.e2e.ts \
  --base 1fe416ae40412978b1d834a981127f61899d043b \
  --head bbeded9e5d77ab3740d8ccfdda999d14ebafd1f0 \
  --upload-command 'ghdrop upload'
