From 49a6090dcf2e143c8db939ae99fc843b504d5691 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Tue, 17 Mar 2026 12:48:12 +0100 Subject: [PATCH] fix(ci): Make PKG_LICENSE warning instead of error - PKG_LICENSE is now recommended, not required - Required: PKG_NAME, PKG_VERSION, PKG_RELEASE - Warnings are reported but don't fail the build - Also updated tracking docs Co-Authored-By: Claude Opus 4.5 --- .github/workflows/test-validate.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-validate.yml b/.github/workflows/test-validate.yml index fbca9b31..91c7e184 100644 --- a/.github/workflows/test-validate.yml +++ b/.github/workflows/test-validate.yml @@ -28,26 +28,38 @@ jobs: echo "📋 Validating Makefile structure..." ERRORS=0 + WARNINGS=0 for makefile in luci-app-*/Makefile package/secubox/luci-app-*/Makefile; do if [[ -f "$makefile" ]]; then PKG=$(dirname "$makefile") echo " 🔍 Checking $PKG..." - - # Required fields + + # Required fields (must have) REQUIRED_FIELDS=( "PKG_NAME" "PKG_VERSION" "PKG_RELEASE" + ) + + # Recommended fields (warn if missing) + RECOMMENDED_FIELDS=( "PKG_LICENSE" ) - + for field in "${REQUIRED_FIELDS[@]}"; do if ! grep -q "^${field}:=" "$makefile"; then - echo " ❌ Missing: $field" + echo " ❌ Missing required: $field" ERRORS=$((ERRORS + 1)) fi done + + for field in "${RECOMMENDED_FIELDS[@]}"; do + if ! grep -q "^${field}:=" "$makefile"; then + echo " ⚠️ Missing recommended: $field" + WARNINGS=$((WARNINGS + 1)) + fi + done # Check for include statements if ! grep -q "include.*luci.mk\|include.*package.mk" "$makefile"; then @@ -57,6 +69,9 @@ jobs: fi done + if [[ $WARNINGS -gt 0 ]]; then + echo "⚠️ Found $WARNINGS warnings (non-blocking)" + fi if [[ $ERRORS -gt 0 ]]; then echo "❌ Found $ERRORS errors" exit 1