mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Implement min_version in app manifest
This commit is contained in:
parent
eee43f5e11
commit
f3fb0d1c94
1 changed files with 8 additions and 0 deletions
|
@ -310,6 +310,10 @@ def app_upgrade(app, url=None, file=None):
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Check min version
|
||||||
|
if 'min_version' in manifest and __version__ < manifest['min_version']:
|
||||||
|
raise YunoHostError(1, app_id + _(" requires a more recent version of the moulinette"))
|
||||||
|
|
||||||
app_setting_path = apps_setting_path +'/'+ app_id
|
app_setting_path = apps_setting_path +'/'+ app_id
|
||||||
|
|
||||||
if original_app_id != app_id:
|
if original_app_id != app_id:
|
||||||
|
@ -384,6 +388,10 @@ def app_install(app, label=None, args=None):
|
||||||
else:
|
else:
|
||||||
manifest = _extract_app_from_file(app)
|
manifest = _extract_app_from_file(app)
|
||||||
|
|
||||||
|
# Check min version
|
||||||
|
if 'min_version' in manifest and __version__ < manifest['min_version']:
|
||||||
|
raise YunoHostError(1, _("App requires a more recent version of the moulinette"))
|
||||||
|
|
||||||
# Check ID
|
# Check ID
|
||||||
if 'id' not in manifest or '__' in manifest['id']:
|
if 'id' not in manifest or '__' in manifest['id']:
|
||||||
raise YunoHostError(22, _("App id is invalid"))
|
raise YunoHostError(22, _("App id is invalid"))
|
||||||
|
|
Loading…
Reference in a new issue