mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
Merge pull request #119 from YunoHost/level_in_json
Intègre le level du json au -build.json
This commit is contained in:
commit
336fab78bc
1 changed files with 7 additions and 1 deletions
|
@ -82,6 +82,7 @@ for app, info in apps_list.items():
|
|||
app_url = info['url']
|
||||
app_rev = info['revision']
|
||||
app_state = info["state"]
|
||||
app_level = info.get("level")
|
||||
|
||||
previous_state = already_built_file.get(app, {}).get("state", {})
|
||||
|
||||
|
@ -90,6 +91,7 @@ for app, info in apps_list.items():
|
|||
|
||||
previous_rev = already_built_file.get(app, {}).get("git", {}).get("revision", None)
|
||||
previous_url = already_built_file.get(app, {}).get("git", {}).get("url")
|
||||
previous_level = already_built_file.get(app, {}).get("level")
|
||||
|
||||
if previous_rev == app_rev and previous_url == app_url:
|
||||
print("%s[%s] is already up to date in target output, ignore" % (app, app_rev))
|
||||
|
@ -97,6 +99,9 @@ for app, info in apps_list.items():
|
|||
if previous_state != app_state:
|
||||
result_dict[app]["state"] = app_state
|
||||
print("... but has changed of state, updating it from '%s' to '%s'" % (previous_state, app_state))
|
||||
if previous_level != app_level or app_level is None:
|
||||
result_dict[app]["level"] = app_level
|
||||
print("... but has changed of level, updating it from '%s' to '%s'" % (previous_level, app_level))
|
||||
continue
|
||||
|
||||
# Hosted on GitHub
|
||||
|
@ -202,7 +207,8 @@ for app, info in apps_list.items():
|
|||
},
|
||||
'lastUpdate': timestamp,
|
||||
'manifest': manifest,
|
||||
'state': info['state']
|
||||
'state': info['state'],
|
||||
'level': info.get('level', '?')
|
||||
}
|
||||
except KeyError as e:
|
||||
print("-> Error: invalid app info or manifest, %s" % e)
|
||||
|
|
Loading…
Add table
Reference in a new issue