Merge pull request #91 from YunoHost/fix-version

Fix error when revision version > 9
This commit is contained in:
Alexandre Aubin 2021-01-09 16:22:05 +01:00 committed by GitHub
commit 6d04f17c8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -992,7 +992,7 @@ class Manifest(TestSuite):
@test() @test()
def version_format(self): def version_format(self):
if self.manifest.get("version", "")[-5:-1] != "~ynh": if not re.match("^([0-9]|\.|-)+~ynh[0-9]+$", self.manifest.get("version", "")):
yield Error( yield Error(
"The 'version' field should match the format <upstreamversion>~ynh<packageversion>. " "The 'version' field should match the format <upstreamversion>~ynh<packageversion>. "
"For example: 4.3-2~ynh3. It is composed of the upstream version number (in the " "For example: 4.3-2~ynh3. It is composed of the upstream version number (in the "