Add a check that yunohost required version is not 2.x

This commit is contained in:
Alexandre Aubin 2020-11-03 17:45:17 +01:00
parent 2e4b25e008
commit 43523543e0

View file

@ -666,6 +666,13 @@ class Manifest(TestSuite):
if not self.manifest.get("requirements", {}).get("yunohost", ""): if not self.manifest.get("requirements", {}).get("yunohost", ""):
yield Error("You should add a yunohost version requirement in the manifest") yield Error("You should add a yunohost version requirement in the manifest")
@test()
def yunohost_version_requirement_superold(app):
yunohost_version_req = app.manifest.get("requirements", {}).get("yunohost", "").strip(">= ")
if yunohost_version_req.startswith("2."):
yield Error("Your app only requires yunohost >= 2.x, which tends to indicate that your app may not be up to date with recommended packaging practices and helpers.")
@test() @test()
def basic_fields_format(self): def basic_fields_format(self):