From db207fd9b7a20ed81c6ba73bf4b7d125b16531dc Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Sun, 20 Sep 2026 09:07:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(scripts):=20=E9=BB=98=E8=AE=A4=E4=BA=A7?= =?UTF-8?q?=E7=89=A9=E7=9B=AE=E5=BD=95=E8=90=BD=E5=88=B0=E5=86=85=E6=A0=B8?= =?UTF-8?q?=E4=BB=93=20dist/plugins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原默认 `$SDK_DIR/../dist/plugins`,在 SDK 仓位于 third_party/homeagent-sdk 时 会解析成 **third_party/dist/plugins** —— 既不在内核仓的发布产物目录 (upload_assets.py 认 dist/release 那套),也不在 SDK 仓内,等于丢在夹缝里, 必须每次显式传 OUT 才不会错。 改为向上找「含 go.mod 与 internal/ 的目录」即内核仓根,取其 dist/plugins。 不在内核仓内(SDK 被单独 clone)时回退到 SDK 仓自己的 dist/plugins。 不写死 ../../ 的理由:SDK 仓既可作 submodule 位于主仓内,也可被单独 clone, 写死相对路径会把产物丢到仓外。 --- scripts/build_plugin_bundles.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/scripts/build_plugin_bundles.sh b/scripts/build_plugin_bundles.sh index e9cac1f..6c42c74 100755 --- a/scripts/build_plugin_bundles.sh +++ b/scripts/build_plugin_bundles.sh @@ -12,14 +12,31 @@ # # 环境: # HMAPDEV hmapdev 可执行文件(默认取 PATH 上的 hmapdev) -# OUT 产物目录(默认