fix: preserve local env overrides in shell pipelines
Some checks failed
CI / go-test (push) Has been cancelled
CI / scripts-regression (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / docker-build (push) Has been cancelled

This commit is contained in:
phamnazage-jpg
2026-05-30 16:38:38 +08:00
parent 9ff023dab4
commit 98b9203302
13 changed files with 402 additions and 97 deletions

View File

@@ -4,15 +4,8 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"
source scripts/report_utils.sh
if [[ -f ".env.local" ]]; then
# shellcheck disable=SC1091
source ".env.local"
fi
if [[ -f ".env" ]]; then
# shellcheck disable=SC1091
source ".env"
fi
while IFS= read -r kv; do export "$kv"; done < <("$ROOT_DIR/scripts/load_project_env.sh" ".env.local")
while IFS= read -r kv; do key="${kv%%=*}"; [[ -n "$key" && -n "${!key:-}" ]] && continue; export "$kv"; done < <("$ROOT_DIR/scripts/load_project_env.sh" ".env")
DB_URL="${DATABASE_URL:-host=/var/run/postgresql dbname=llm_intelligence user=long sslmode=disable}"
TODAY="$(report_date_value)"