修复通知
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m25s

This commit is contained in:
2026-08-11 11:18:11 +08:00
parent 5c01008d8a
commit a795ca3650
20 changed files with 167 additions and 37 deletions

View File

@@ -15,7 +15,7 @@ done
[[ -z "$(command -v omx 2>/dev/null || true)" ]]
! grep -RIlE 'oh-my-codex|OMX:' AGENTS.md CLAUDE.md .agents .claude >/dev/null 2>&1
[[ -z "$(git ls-files .lh-harness)" ]]
[[ -z "$(find . -type f -name '*_test.go' -not -path './.git/*' -print)" ]]
[[ -z "$(find . -type f -name '*_test.go' -not -path './.git/*' -not -path './.lh-harness/*' -print)" ]]
[[ ! -e tests ]]
[[ ! -e internal/testutil ]]
[[ ! -e scripts/benchmark ]]

View File

@@ -5,11 +5,29 @@
set -e
# 加载 .env 文件 (如果存在)
# 加载 .env 文件 (如果存在)。显式传入的 DB_* 始终优先,避免隔离库参数被覆盖。
EXPLICIT_DB_HOST=${DB_HOST+x}
EXPLICIT_DB_PORT=${DB_PORT+x}
EXPLICIT_DB_USER=${DB_USER+x}
EXPLICIT_DB_PASSWORD=${DB_PASSWORD+x}
EXPLICIT_DB_NAME=${DB_NAME+x}
EXPLICIT_DB_SSLMODE=${DB_SSLMODE+x}
SAVED_DB_HOST=${DB_HOST-}
SAVED_DB_PORT=${DB_PORT-}
SAVED_DB_USER=${DB_USER-}
SAVED_DB_PASSWORD=${DB_PASSWORD-}
SAVED_DB_NAME=${DB_NAME-}
SAVED_DB_SSLMODE=${DB_SSLMODE-}
if [ -f .env ]; then
echo "正在加载 .env 文件..."
export $(grep -v '^#' .env | xargs)
fi
[ -n "$EXPLICIT_DB_HOST" ] && DB_HOST=$SAVED_DB_HOST
[ -n "$EXPLICIT_DB_PORT" ] && DB_PORT=$SAVED_DB_PORT
[ -n "$EXPLICIT_DB_USER" ] && DB_USER=$SAVED_DB_USER
[ -n "$EXPLICIT_DB_PASSWORD" ] && DB_PASSWORD=$SAVED_DB_PASSWORD
[ -n "$EXPLICIT_DB_NAME" ] && DB_NAME=$SAVED_DB_NAME
[ -n "$EXPLICIT_DB_SSLMODE" ] && DB_SSLMODE=$SAVED_DB_SSLMODE
# 默认配置
MIGRATIONS_DIR="${MIGRATIONS_DIR:-migrations}"