abuild: invalidate pkgver ending with -r#

This commit is contained in:
Sertonix 2024-03-22 12:20:54 +01:00 committed by Natanael Copa
parent 2e27c5b202
commit 17648366cc

View File

@ -191,7 +191,7 @@ default_sanitycheck() {
local i= j= suggestion= local i= j= suggestion=
msg "Checking sanity of $APKBUILD..." msg "Checking sanity of $APKBUILD..."
[ -z "$pkgver" ] && die "Missing pkgver in APKBUILD" [ -z "$pkgver" ] && die "Missing pkgver in APKBUILD"
$APK version --check --quiet "$pkgver" || \ $APK version --check --quiet -- "$pkgver"-r0 || \
die "$pkgver is not a valid version" die "$pkgver is not a valid version"
[ -z "$pkgrel" ] && die "Missing pkgrel in APKBUILD" [ -z "$pkgrel" ] && die "Missing pkgrel in APKBUILD"
# give 0 as it is always valid and give the pkgrel # give 0 as it is always valid and give the pkgrel