linter: check package version format

This commit is contained in:
Leonid Pliushch 2021-12-23 15:31:33 +02:00
parent 067f59a319
commit 1b7a64470c
No known key found for this signature in database
GPG Key ID: 45F2964132545795
1 changed files with 5 additions and 1 deletions

View File

@ -168,7 +168,11 @@ lint_package() {
echo -n "TERMUX_PKG_VERSION: "
if [ -n "$TERMUX_PKG_VERSION" ]; then
echo "PASS"
if grep -qiP '^[0-9][0-9a-z+\-\.]*' <<< "$TERMUX_PKG_VERSION"; then
echo "PASS"
else
echo "INVALID (contains characters that are not allowed)"
fi
else
echo "NOT SET"
pkg_lint_error=true