We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function parse(versionString) -- 解析版本字符串 end -- 版本比较 function semvereq(v1, v2) -- 相等比较 end function semvergt(v1, v2) -- 大于比较 end function semverlt(v1, v2) -- 小于比较 end
用于处理语义化的版本标识
lib5 = ">1.2.3" # 大于 1.2.3 lib6 = ">=1.2.3" # 大于等于 1.2.3 lib7 = "<2.0.0" # 小于 2.0.0
The text was updated successfully, but these errors were encountered:
基本代码 目前在 core/installer/base/deps_version_parser.lua
Sorry, something went wrong.
更新代码 新增了 -beta1 -alpha1 一类后缀的支持
现在 parse_version 解析后的版本对象类似于这样 { min = "1.0", max = nil, min_inclusive = true } nil 为不限制 此时xxx_inclusive应为nil 但无论xxx_inclusive的值是什么都不影响意思 xxx_inclusive=true 表示包含某版本 若xxx不为nil那么此字段必不为nil
parse_version
{ min = "1.0", max = nil, min_inclusive = true }
nil
xxx_inclusive
xxx_inclusive=true
xxx
gen_deps 需要类似 { {a="version_str",b=">=1.0"}, {...} }这样的参数 输出 { a={...}, b={...} } 其中省略部分为上述解析后的版本对象
gen_deps
{ {a="version_str",b=">=1.0"}, {...} }
{ a={...}, b={...} }
compare_version 的返回结果可以看测试代码 目前用 -1, 0, 1 表示 小于 等于 大于
compare_version
MoYingJi
No branches or pull requests
Features Describe | 功能描述
Usage Scenario | 需求背景/使用场景
用于处理语义化的版本标识
Maybe Solutions | 可能的实现方案 - (if you are developer)
Additional context | 额外补充
The text was updated successfully, but these errors were encountered: