From ae458549774516e036b785375c5cde0f3b408044 Mon Sep 17 00:00:00 2001 From: yusing Date: Mon, 16 Feb 2026 08:24:14 +0800 Subject: [PATCH] fix(makefile): update minify-js target to conditionally skip based on agent and socket-proxy flags --- Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 58abc33e..629b187c 100755 --- a/Makefile +++ b/Makefile @@ -118,13 +118,18 @@ mod-tidy: done minify-js: - for file in $$(find internal/ -name '*.js' | grep -v -- '-min\.js$$'); do \ - ext="$${file##*.}"; \ - base="$${file%.*}"; \ - min_file="$${base}-min.$$ext"; \ - echo "minifying $$file -> $$min_file"; \ - bunx --bun uglify-js $$file --compress --mangle --output $$min_file; \ - done + @if [ ${agent} = 1 ]; then \ + echo "minify-js: skipped for agent"; \ + elif [ ${socket-proxy} = 1 ]; then \ + echo "minify-js: skipped for socket-proxy"; \ + else \ + for file in $(find internal/ -name '*.js' | grep -v -- '-min\.js$'); do \ + ext="${file##*.}"; \ + base="${file%.*}"; \ + min_file="${base}-min.$ext"; \ + bunx --bun uglify-js $file --compress --mangle --output $min_file; \ + done \ + fi build: minify-js mkdir -p $(shell dirname ${BIN_PATH})