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

@@ -5,14 +5,8 @@ set -euo pipefail
PROJECT_DIR="/home/long/project/llm-intelligence"
. "$PROJECT_DIR/scripts/report_utils.sh"
if [[ -f "$PROJECT_DIR/.env.local" ]]; then
# shellcheck disable=SC1091
source "$PROJECT_DIR/.env.local"
fi
if [[ -f "$PROJECT_DIR/.env" ]]; then
# shellcheck disable=SC1091
source "$PROJECT_DIR/.env"
fi
while IFS= read -r kv; do export "$kv"; done < <("$PROJECT_DIR/scripts/load_project_env.sh" "$PROJECT_DIR/.env.local")
while IFS= read -r kv; do [[ -n "${kv%%=*}" && -n "${!kv%%=*:-}" ]] && continue; export "$kv"; done < <("$PROJECT_DIR/scripts/load_project_env.sh" "$PROJECT_DIR/.env")
DB_URL="${DATABASE_URL:-host=/var/run/postgresql dbname=llm_intelligence user=long sslmode=disable}"
export DATABASE_URL="$DB_URL"
REPORT_DATE="$(report_date_value)"