diff options
| author | ruki <[email protected]> | 2026-05-26 22:26:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-05-26 22:26:24 +0800 |
| commit | badf11560137fc50a06d66985aabec9e4b194c95 (patch) | |
| tree | 95d118e84f852d87a1f22e9b932ee5a0429bc7b3 | |
| parent | 1f02e88cce9a9fba47646a2a5cf4eea96c25dde3 (diff) | |
improve version name
| -rw-r--r-- | xmake/modules/package/manager/nuget/find_package.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/package/manager/nuget/find_package.lua b/xmake/modules/package/manager/nuget/find_package.lua index 36d8561c1..e858052e6 100644 --- a/xmake/modules/package/manager/nuget/find_package.lua +++ b/xmake/modules/package/manager/nuget/find_package.lua @@ -28,14 +28,14 @@ import("core.project.config") import("core.project.target") import("private.utils.toolchain", {alias = "toolchain_utils"}) --- convert nuget 4-segment version to semver build metadata +-- convert nuget 4-segment System.Version (major.minor.build.revision) to semver build metadata -- e.g. 1.0.3967.48 -> 1.0.3967+48 -- @see https://github.com/xmake-io/xmake/issues/7556 function _to_semver_version(version) if version then - local major, minor, patch, build = version:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)$") + local major, minor, build, revision = version:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)$") if major then - return major .. "." .. minor .. "." .. patch .. "+" .. build + return major .. "." .. minor .. "." .. build .. "+" .. revision end end return version |
