From c8612e544795a03728c411a82d053a47e3be19df Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 21 Oct 2025 23:27:31 +0800 Subject: sort build number in package --- xmake/core/package/package.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 4e89c0cd7..80189425d 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -1485,8 +1485,10 @@ end -- get versions function _instance:versions() if self._VERSIONS == nil then + -- we need to sort the build number in semver list + -- https://github.com/xmake-io/xmake/issues/6953 local versions = {} - for version, _ in pairs(self:_versions_list()) do + for version, _ in table.orderpairs(self:_versions_list()) do -- remove the url alias prefix if exists local pos = version:find(':', 1, true) if pos then -- cgit v1.3.1