fix(build): go:embed all:static 编译阻塞修复 — .gitignore 允许 .gitkeep 占位
问题: backend/static/ 在 .gitignore 中忽略整个目录,导致 .gitkeep 无法被 git 追踪。全新 clone 后 go build ./... 报错: 'pattern all:static: cannot embed directory static: contains no embeddable files' 修复: - .gitignore: backend/static/ → backend/static/* + !backend/static/.gitkeep - 新增 backend/static/.gitkeep 占位文件(go:embed 需要至少一个可嵌入文件) 验证: go build ./... ✅ | tsc -b ✅ | npm build ✅(21s) | 17/17 集成测试 ✅ 质量: any=37 unused=2 console=0
This commit is contained in:
1 parent
f170fed900
commit
eddf01dd79
2 files changed
+3
-1
No files matched your search
+3
-1
@@ -82,7 +82,9 @@ agent/aiops-agent
|
|||||||
agent/bin/
|
agent/bin/
|
||||||
|
|
||||||
# embed 模式临时目录(前端构建产物,编译后清理)
|
# embed 模式临时目录(前端构建产物,编译后清理)
|
||||||
backend/static/
|
# 保留 .gitkeep 占位文件确保 go:embed all:static 在全新 clone 后可编译
|
||||||
|
backend/static/*
|
||||||
|
!backend/static/.gitkeep
|
||||||
backend/cmd/static/
|
backend/cmd/static/
|
||||||
|
|
||||||
# Hermes agent config (personal, not project)
|
# Hermes agent config (personal, not project)
|
||||||
|
|||||||
Whitespace-only changes.
Reference in new issue
Block a user