feat(ui): when updating to a new version, show the version instead of the commit refs

This commit is contained in:
Folke Lemaitre 2022-12-31 16:08:01 +01:00
parent 34e2c78e06
commit 0fadb5e1ce
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 10 additions and 3 deletions

View File

@ -341,9 +341,16 @@ function M:diagnostics(plugin)
message = "already up to date", message = "already up to date",
}) })
else else
self:diagnostic({ local version = Git.info(plugin.dir, true).version
message = "updated from " .. plugin._.updated.from:sub(1, 7) .. " to " .. plugin._.updated.to:sub(1, 7), if version then
}) self:diagnostic({
message = "updated to " .. tostring(version),
})
else
self:diagnostic({
message = "updated from " .. plugin._.updated.from:sub(1, 7) .. " to " .. plugin._.updated.to:sub(1, 7),
})
end
end end
elseif plugin._.updates then elseif plugin._.updates then
local version = plugin._.updates.to.version local version = plugin._.updates.to.version