摘要
版本号的格式为 X.Y.Z(又称 Major.Minor.Patch),递增的规则为:
- X 表示主版本号,当 API 的兼容性变化时,X 需递增。
- Y 表示次版本号,当增加功能时(不影响 API 的兼容性),Y 需递增。
- Z 表示修订号,当做 Bug 修复时(不影响 API 的兼容性),Z 需递增。
常用操作: 增加新功能 Y+1, 修复Bug Z+1
详细规则
- X, Y, Z 必须为非负整数,且不得包含前导零,必须按数值递增,如 1.9.0 -> 1.10.0 -> 1.11.0
- 0.Y.Z 的版本号表明软件处于初始开发阶段,意味着 API 可能不稳定;1.0.0 表明版本已有稳定的 API
- 先行版本号(Pre-release)意味该版本不稳定,可能存在兼容性问题,其格式为:X.Y.Z.[a-c][正整数],如 1.0.0.a1,1.0.0.b99,1.0.0.c1000。
常见修饰词:1
2
3
4
5
6
7
8
9
10
11
12alpha:内部版本
beta:测试版
demo:演示版
enhance:增强版
free:自由版
full version:完整版,即正式版
lts:长期维护版本
release:发行版
rc:即将作为正式版发布
standard:标准版
ultimate:旗舰版
upgrade:升级版
FAQ
如何判断发布 1.0.0 版本的时机?
当你的软件被用于正式环境,它应该已经达到了 1.0.0 版。如果你已经有个稳定的 API 被使用者依赖,也会是 1.0.0 版。如果你很担心向下兼容的问题,也应该算是 1.0.0 版了。
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !