mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add current and new version for apps in tools_update output
This commit is contained in:
parent
ad9430b3ea
commit
7ebb8bade3
1 changed files with 13 additions and 1 deletions
|
@ -534,9 +534,21 @@ def _list_upgradable_apps():
|
|||
app_dict = app_info(app_id, raw=True)
|
||||
|
||||
if app_dict["upgradable"] == "yes":
|
||||
|
||||
current_version = app_dict.get("version", "?")
|
||||
current_commit = app_dict.get("status", {}).get("remote", {}).get("revision", "?")[:7]
|
||||
new_version = app_dict.get("manifest",{}).get("version","?")
|
||||
new_commit = app_dict.get("git", {}).get("revision", "?")[:7]
|
||||
|
||||
if current_version == new_version:
|
||||
current_version += " (" + current_commit + ")"
|
||||
new_version += " (" + new_commit + ")"
|
||||
|
||||
yield {
|
||||
'id': app_id,
|
||||
'label': app_dict['settings']['label']
|
||||
'label': app_dict['settings']['label'],
|
||||
'current_version': current_version,
|
||||
'new_version': new_version
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue