Skip to content

v0.2.1

Choose a tag to compare

@miclle miclle released this 05 May 05:51
· 23 commits to main since this release
c88eb8e

🐛 修复

  • fox-openapi version 不再硬编码输出 "dev":之前 var version = \"dev\" 没有任何注入机制,go install github.com/fox-gonic/openapi/cmd/fox-openapi@vX.Y.Z 安装的二进制运行 version 命令也只会得到 "dev"。现在改用 runtime/debug.ReadBuildInfo() 解析模块版本:
    1. -ldflags \"-X main.version=...\" 覆盖(CI/release 构建可注入)
    2. runtime/debug.ReadBuildInfo() 的 Main.Version ← go install module@vX.Y.Z 自动报告 tag
    3. VCS revision (+dirty) 用于源码 go build
    4. 兜底 "dev"

✅ 验证

升级后:

```bash
go install github.com/fox-gonic/openapi/cmd/fox-openapi@v0.2.1
fox-openapi version

v0.2.1

```

Full Changelog: v0.2.0...v0.2.1