- Introduced a new target `check_swag_version` to validate the compatibility of the Swagger generator version with the project's Go version.
- Added warnings for mismatches between the Swagger generator version and the project's Go version, as well as the system's Go version.
- Updated the `gen_swag` target to depend on `check_swag_version` for improved build reliability.
the result that checker will output like are list below:
root@localhost ~/SQLE/ce/dms main* ❯ make check_swag_version 07:50:59 AM
Project go.mod Version: 1.24.0
Swagger Version: v0.30.4 (Expected Go: 1.19)
System Go Version: 1.24.4
Warning: Current Swagger generator (v0.30.4, Go 1.19) does not match project's go.mod (1.24.0).
Please update the Swagger generator to match the project Go version.
root@localhost ~/SQLE/ce/dms main* ❯ make check_swag_version 07:51:16 AM
Project go.mod Version: 1.24.0
Swagger Version: v0.33.1 (Expected Go: 1.24.0)
System Go Version: 1.24.4
关联的 issue
#581
描述你的变更
如果不匹配,会输出:
如果匹配,会输出:
确认项(pr提交后操作)
Tip
请在指定复审人之前,确认并完成以下事项,完成后✅
not_compatibleneed_update_doc