fix version 1

This commit is contained in:
2026-09-22 21:15:34 +08:00
parent 9f86366638
commit d63d7e8b3a
277 changed files with 9959 additions and 1514 deletions

View File

@@ -7,13 +7,26 @@ readonly WORKSPACE_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)"
cd -- "${WORKSPACE_ROOT}"
unformatted="$(gofmt -l pkgs module)"
# 本地开发前提go.work 把共享 SDK 替换为工作区外的相对路径,缺少该目录时整个工作区都无法解析。
readonly SDK_DIR="${WORKSPACE_ROOT}/../../bsm-sdk/core"
if [[ ! -d "${SDK_DIR}" ]]; then
echo "error: 未找到共享 SDK 目录: ${SDK_DIR}" >&2
echo "error: 本地开发前提不满足:请先将 bsm-sdk/core 检出到工作区上一级目录的同级路径,即 ${SDK_DIR}" >&2
exit 1
fi
unformatted="$(gofmt -l pkgs module scripts)"
if [[ -n "${unformatted}" ]]; then
printf 'error: gofmt required:\n%s\n' "${unformatted}" >&2
exit 1
fi
mapfile -t modules < <(go list -m -f '{{.Dir}}')
if (( ${#modules[@]} == 0 )); then
echo "error: 未解析到任何工作区模块go list -m 可能失败或返回空列表" >&2
exit 1
fi
for module_dir in "${modules[@]}"; do
echo "==> ${module_dir}"
(