lumberjack改造前
This commit is contained in:
@@ -61,6 +61,7 @@ function build() {
|
||||
cp "$ROOT"/configs/cluster.template.yaml "$DIST"/configs
|
||||
cp -R "$ROOT"/www "$DIST"/
|
||||
cp -R "$ROOT"/pages "$DIST"/
|
||||
copy_fluent_bit_assets "$ROOT" "$DIST" "$OS" "$ARCH" || exit 1
|
||||
|
||||
# we support TOA on linux only
|
||||
if [ "$OS" == "linux" ] && [ -f "${ROOT}/edge-toa/edge-toa-${ARCH}" ]
|
||||
@@ -168,6 +169,43 @@ function build() {
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
function copy_fluent_bit_assets() {
|
||||
ROOT=$1
|
||||
DIST=$2
|
||||
OS=$3
|
||||
ARCH=$4
|
||||
FLUENT_ROOT="$ROOT/../../deploy/fluent-bit"
|
||||
FLUENT_DIST="$DIST/deploy/fluent-bit"
|
||||
|
||||
if [ ! -d "$FLUENT_ROOT" ]; then
|
||||
echo "[error] fluent-bit source directory not found: $FLUENT_ROOT"
|
||||
return 1
|
||||
fi
|
||||
|
||||
rm -rf "$FLUENT_DIST"
|
||||
mkdir -p "$FLUENT_DIST"
|
||||
|
||||
for file in fluent-bit.conf fluent-bit-dns.conf parsers.conf clickhouse-upstream.conf logrotate.conf README.md; do
|
||||
if [ -f "$FLUENT_ROOT/$file" ]; then
|
||||
cp "$FLUENT_ROOT/$file" "$FLUENT_DIST/"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$OS" = "linux" ]; then
|
||||
PACKAGE_SRC="$FLUENT_ROOT/packages/linux-$ARCH"
|
||||
PACKAGE_DST="$FLUENT_DIST/packages/linux-$ARCH"
|
||||
if [ -d "$PACKAGE_SRC" ]; then
|
||||
mkdir -p "$PACKAGE_DST"
|
||||
cp -R "$PACKAGE_SRC/." "$PACKAGE_DST/"
|
||||
else
|
||||
echo "[error] fluent-bit package directory not found: $PACKAGE_SRC"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function lookup-version() {
|
||||
FILE=$1
|
||||
VERSION_DATA=$(cat "$FILE")
|
||||
|
||||
Reference in New Issue
Block a user