plugindev: generate go.mod without local absolute replace; auto-download SDK module on first build

- init 生成的 go.mod 只 require SDK 线上版本(gitcode.com/JianFeeeee/homeagent-sdk v0.8.0),不再写本地绝对路径 replace
- build 仅在显式指定(plg.json sdk_path 或 --sdk-path)时写入 replace
- 首次构建自动执行 go mod download <sdk_module> 生成 go.sum(修复无 go.sum 构建失败)
- 修正 ensureGoMod 模块名解析(支持 require 行与 require 块)
This commit is contained in:
root
2026-07-31 13:12:32 +08:00
parent bc1a005885
commit 62447e3952
4 changed files with 51 additions and 33 deletions

3
.gitignore vendored
View File

@ -25,3 +25,6 @@ z_entry.c
# Pre-built plugindev binaries in bin/ should be tracked
!bin/plugindev*
!bin/*.exe
# plugindev binary in tools/
tools/plugindev/plugindev