#!/bin/bash

# pipedream/tools/run standalone --mailto=tsemple@zoox.com sim/scenario_generator/run_weekly_batch.sh

set -euo pipefail

M2_TAG_NAME="scen_gen_$(date +"%m_%d_%y")_R$RANDOM"
export GLOG_logtostderr=1
export GLOG_minloglevel=0

bazel run //sim/scenario_generator:generate -- --params-kv scenario_count=100 --params-kv location_file="$ZOOX_WORKSPACE_ROOT/sim/scenario_generator/config/basic_slac_location.pbtxt" --params-kv config_file="$ZOOX_WORKSPACE_ROOT/sim/scenario_generator/config/weekly_batch_config.pbtxt" --params-kv log=all --params-kv marvel_v2_tag_name=$M2_TAG_NAME
bazel run //sim/scenario_generator:generate -- --params-kv scenario_count=100 --params-kv location_file="$ZOOX_WORKSPACE_ROOT/sim/scenario_generator/config/all_embarcadero_location.pbtxt" --params-kv config_file="$ZOOX_WORKSPACE_ROOT/sim/scenario_generator/config/weekly_batch_config.pbtxt" --params-kv log=all --params-kv marvel_v2_tag_name=$M2_TAG_NAME
bazel run //sim/scenario_generator:generate -- --params-kv scenario_count=25 --params-kv location_file="$ZOOX_WORKSPACE_ROOT/sim/scenario_generator/config/basic_vegas_location.pbtxt" --params-kv config_file="$ZOOX_WORKSPACE_ROOT/sim/scenario_generator/config/weekly_batch_config.pbtxt" --params-kv log=all --params-kv marvel_v2_tag_name=$M2_TAG_NAME
bazel run //sim/scenario_generator:run_tag -- --tag $M2_TAG_NAME --suite ${M2_TAG_NAME}_suite --branch develop/sim
