Deprecate apps requiring only 3.x, + warning for app requring 4.0 (there's just a handful of those and most are old/notworking)

This commit is contained in:
Alexandre Aubin 2022-08-13 17:36:18 +02:00
parent c7d1bf2138
commit f990b5215e

View file

@ -1453,13 +1453,13 @@ class Manifest(TestSuite):
yunohost_version_req = ( yunohost_version_req = (
app.manifest.get("requirements", {}).get("yunohost", "").strip(">= ") app.manifest.get("requirements", {}).get("yunohost", "").strip(">= ")
) )
if yunohost_version_req.startswith("2."): if yunohost_version_req.startswith("2.") or yunohost_version_req.startswith("3."):
yield Critical( yield Critical(
"Your app only requires YunoHost >= 2.x, which tends to indicate that it may not be up to date with recommended packaging practices and helpers." "Your app only requires YunoHost >= 2.x or 3.x, which tends to indicate that it may not be up to date with recommended packaging practices and helpers."
) )
elif yunohost_version_req.startswith( elif yunohost_version_req.startswith(
"3." "3."
) and not yunohost_version_req.startswith("3.8"): ) and not yunohost_version_req.startswith("4.0"):
yield Warning( yield Warning(
"Your app only requires yunohost >= 3.x, which tends to indicate that it may not be up to date with recommended packaging practices and helpers." "Your app only requires yunohost >= 3.x, which tends to indicate that it may not be up to date with recommended packaging practices and helpers."
) )