File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,12 +15,23 @@ set -euo pipefail
1515# See setup-recording-keys.ts for the full env override list.
1616
1717SCRIPT_DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
18+ LOCAL_DEV_DIR=" $( cd " $SCRIPT_DIR /.." && pwd) "
1819DENO_BIN=" ${DENO_BIN:- deno} "
1920command -v " $DENO_BIN " > /dev/null 2>&1 || DENO_BIN=" $HOME /.deno/bin/deno"
2021command -v " $DENO_BIN " > /dev/null 2>&1 || {
2122 echo " ERROR: deno not found. Run up.sh first or install Deno." >&2
2223 exit 1
2324}
2425
26+ # Wipe the stack so every recording run starts from an empty Stellar ledger
27+ # and empty platform databases. down.sh nukes services + containers + state;
28+ # up.sh repopulates a fresh stack. Skip with SKIP_STACK_RESET=1.
29+ if [ " ${SKIP_STACK_RESET:- 0} " != " 1" ]; then
30+ echo " === Resetting stack (down + up) ==="
31+ bash " $LOCAL_DEV_DIR /down.sh"
32+ bash " $LOCAL_DEV_DIR /up.sh"
33+ echo
34+ fi
35+
2536cd " $SCRIPT_DIR "
2637exec " $DENO_BIN " run --allow-all setup-recording-keys.ts " $@ "
You can’t perform that action at this time.
0 commit comments