build: package production configs and use system protoc

This commit is contained in:
2026-08-09 18:40:36 +08:00
parent 4fe24d9770
commit 9f6f318bbb
113 changed files with 221 additions and 141 deletions

View File

@@ -21,7 +21,7 @@ BSM 后端服务的 Go workspace包含基础能力、电商、财务、社交
- Go 1.26.5
- Git
- 按所运行服务准备 PostgreSQL、Redis、etcd、MQ 或对象存储等外部依赖
- 重新生成 protobuf 时可使用仓库内 `.tools/` 的工具,或在 `PATH` 中安装 `protoc``protoc-gen-go``protoc-gen-go-grpc``protoc-gen-grpc-gateway`
- 重新生成 protobuf 时,需要在系统 `PATH` 中安装 `protoc``protoc-gen-go``protoc-gen-go-grpc``protoc-gen-grpc-gateway`
确认工具链:
@@ -52,7 +52,7 @@ bash scripts/update-all.sh
bash scripts/build-all-linux.sh
```
脚本固定交叉编译 Linux x86-64`GOOS=linux``GOARCH=amd64``CGO_ENABLED=0`),产物写入 `builds/<领域>-<模块>``builds/` 已加入 `.gitignore`,聚合入口 `cmd` 不包含在批量构建中。
脚本固定交叉编译 Linux x86-64`GOOS=linux``GOARCH=amd64``CGO_ENABLED=0`),产物写入 `.builds/<领域>-<模块>`全部模块编译成功后,各模块的 `etc/*_prod.yaml` 会复制到 `.builds/etc/``.builds/` 已加入 `.gitignore`,聚合入口 `cmd` 不包含在批量构建中。
## 配置