20 lines
453 B
Bash
20 lines
453 B
Bash
|
|
#!/bin/bash
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
ROOT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
|
||
|
|
ENV_FILE="$ROOT_DIR/.env"
|
||
|
|
ENV_LOADER="$ROOT_DIR/infra/scripts/lib/env.sh"
|
||
|
|
|
||
|
|
if [ ! -f "$ENV_FILE" ]; then
|
||
|
|
echo "Error: env file not found at $ENV_FILE" >&2
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
# shellcheck disable=SC1090
|
||
|
|
. "$ENV_LOADER"
|
||
|
|
load_env_file "$ENV_FILE"
|
||
|
|
load_env_file "$ROOT_DIR/.env.local"
|
||
|
|
|
||
|
|
cd "$ROOT_DIR"
|
||
|
|
PYTHONPATH=backend/src uv run python infra/scripts/generate_redeem_codes.py "$@"
|