ci: final round of APK CI fixes

Using -ne wasn't such a good idea since it would do a numeric compare.
Now use -n which checks if the length is non-zero. APK prints the
problematic version if - problematic - so this should now do the trick.

Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
Paul Spooren
2024-08-17 16:37:04 +02:00
committed by Rosen Penev
parent 64a70f438f
commit 95908326b5

View File

@@ -6,7 +6,7 @@ on:
jobs: jobs:
build: build:
name: Check autorelease deprecation name: Check APK compatible version/release
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@@ -48,15 +48,15 @@ jobs:
PKG_RELEASE=$(grep -E '^PKG_RELEASE' "$ROOT/Makefile" | cut -f 2 -d '=') PKG_RELEASE=$(grep -E '^PKG_RELEASE' "$ROOT/Makefile" | cut -f 2 -d '=')
if [ -n "$PKG_RELEASE" ]; then if [ -n "$PKG_RELEASE" ]; then
if [[ "$PKG_RELEASE" == '^[0-9]+$' ]]; then if [[ "$PKG_RELEASE" == '^[0-9]+$' ]]; then
echo "PKG_RELEASE is not an integer" echo "PKG_RELEASE is not an integer: $PKG_RELEASE"
INCOMPATIBLE_VERSION+=" $ROOT" INCOMPATIBLE_VERSION+=" $ROOT"
break break
fi fi
fi fi
PKG_VERSION=$(grep -E '^PKG_VERSION' "$ROOT/Makefile" | cut -f 2 -d '=') PKG_VERSION=$(grep -E '^PKG_VERSION' "$ROOT/Makefile" | cut -f 2 -d '=')
if [ -n "$PKG_VERSION" ]; then if [ -n "$PKG_VERSION" ]; then
if [[ $($GITHUB_WORKSPACE/apk version --check "$PKG_VERSION") -ne "" ]]; then if [[ -n $($GITHUB_WORKSPACE/apk version --check "$PKG_VERSION") ]]; then
echo "PKG_VERSION is not compatible" echo "PKG_VERSION is not compatible: $PKG_VERSION"
INCOMPATIBLE_VERSION+=" $ROOT" INCOMPATIBLE_VERSION+=" $ROOT"
fi fi
fi fi