ci: add test for validating pkgver for device packages (MR 4994)

This commit is contained in:
Clayton Craft 2024-04-02 14:58:43 -07:00
parent ed377d97fa
commit 284fd42c0a
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A

View file

@ -112,6 +112,13 @@ def check_versions(args, packages):
print(f"- {package}: {head} (HEAD) (new package)")
continue
# Check pkgver follows expected format for device packages
pkgver = head.rpartition('-r')[0]
if package.startswith('device-') and not pkgver.isdigit():
print(f" - {package}: invalid pkgver \"{pkgver}\""
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
error = True
# Compare head and upstream versions
result = pmb.parse.version.compare(head, upstream)
if result != 1: