refactor(build): add empty build_ee.sh extension point + guarded hook (#21616)

This commit is contained in:
xugangqiang authored and GitHub committed 2026-10-28 18:24:54 +08:00
1 parent 762c05d8f1
commit e45956c7a2
2 files changed
+24

No files matched your search

+13
View File
@@ -11,6 +11,11 @@ NC='\033[0m' # No Color
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$SCRIPT_DIR" PROJECT_ROOT="$SCRIPT_DIR"
# EE (enterprise) build extensions - sourced so the OSS body below stays
# untouched and merge conflicts against the EE branch are limited to this
# single line plus the guarded hook call inside run_native_integration_tests.
[[ -f "${SCRIPT_DIR}/build_ee.sh" ]] && source "${SCRIPT_DIR}/build_ee.sh"
# Build directories # Build directories
CPP_DIR="$PROJECT_ROOT/internal/binding/cpp" CPP_DIR="$PROJECT_ROOT/internal/binding/cpp"
BUILD_DIR="$CPP_DIR/cmake-build-release" BUILD_DIR="$CPP_DIR/cmake-build-release"
@@ -1091,6 +1096,14 @@ run_native_integration_tests() {
CGO_ENABLED=1 \ CGO_ENABLED=1 \
go test -tags "cgo static integration fetch_testdata" -race -count=1 \ go test -tags "cgo static integration fetch_testdata" -race -count=1 \
./internal/deepdoc/parser/pdf/inference/native_analyzer/... ) ./internal/deepdoc/parser/pdf/inference/native_analyzer/... )
# EE build extensions hook (build_ee.sh, sourced near the top of this
# script). Guarded so an empty/absent build_ee.sh is a safe no-op on the
# OSS path; the EE build defines run_ee_native_integration_tests to run its
# own native integration/parity tests at this point.
if declare -F run_ee_native_integration_tests >/dev/null 2>&1; then
run_ee_native_integration_tests
fi
} }
# Run Go tests gated behind a build tag (or space-separated tag list), e.g. # Run Go tests gated behind a build tag (or space-separated tag list), e.g.
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# EE (enterprise) build extensions, sourced by build.sh.
#
# This file is an intentionally empty placeholder on the OSS/upstream path. The
# EE build (ragflow_enterprise) populates it with enterprise-only build/test
# logic (e.g. run_ee_native_integration_tests). build.sh only sources this file
# when present and guards the hook call, so an empty/absent file is a harmless
# no-op.
#
# Keep this file free of executable side effects at source time: it must only
# DEFINE functions.