From e45956c7a2424154844036086f75ee1236599a94 Mon Sep 17 00:00:00 2001 From: xugangqiang Date: Wed, 28 Oct 2026 18:24:54 +0800 Subject: [PATCH] refactor(build): add empty build_ee.sh extension point + guarded hook (#21616) --- build.sh | 13 +++++++++++++ build_ee.sh | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 build_ee.sh diff --git a/build.sh b/build.sh index 3189849209..38415ee992 100755 --- a/build.sh +++ b/build.sh @@ -11,6 +11,11 @@ NC='\033[0m' # No Color SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 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 CPP_DIR="$PROJECT_ROOT/internal/binding/cpp" BUILD_DIR="$CPP_DIR/cmake-build-release" @@ -1091,6 +1096,14 @@ run_native_integration_tests() { CGO_ENABLED=1 \ go test -tags "cgo static integration fetch_testdata" -race -count=1 \ ./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. diff --git a/build_ee.sh b/build_ee.sh new file mode 100644 index 0000000000..359fe4a701 --- /dev/null +++ b/build_ee.sh @@ -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.