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 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-03-17 12:48:12 +01:00
parent cb59c58617
commit 49a6090dcf

View File

@ -28,26 +28,38 @@ jobs:
echo "📋 Validating Makefile structure..." echo "📋 Validating Makefile structure..."
ERRORS=0 ERRORS=0
WARNINGS=0
for makefile in luci-app-*/Makefile package/secubox/luci-app-*/Makefile; do for makefile in luci-app-*/Makefile package/secubox/luci-app-*/Makefile; do
if [[ -f "$makefile" ]]; then if [[ -f "$makefile" ]]; then
PKG=$(dirname "$makefile") PKG=$(dirname "$makefile")
echo " 🔍 Checking $PKG..." echo " 🔍 Checking $PKG..."
# Required fields # Required fields (must have)
REQUIRED_FIELDS=( REQUIRED_FIELDS=(
"PKG_NAME" "PKG_NAME"
"PKG_VERSION" "PKG_VERSION"
"PKG_RELEASE" "PKG_RELEASE"
)
# Recommended fields (warn if missing)
RECOMMENDED_FIELDS=(
"PKG_LICENSE" "PKG_LICENSE"
) )
for field in "${REQUIRED_FIELDS[@]}"; do for field in "${REQUIRED_FIELDS[@]}"; do
if ! grep -q "^${field}:=" "$makefile"; then if ! grep -q "^${field}:=" "$makefile"; then
echo " ❌ Missing: $field" echo " ❌ Missing required: $field"
ERRORS=$((ERRORS + 1)) ERRORS=$((ERRORS + 1))
fi fi
done 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 # Check for include statements
if ! grep -q "include.*luci.mk\|include.*package.mk" "$makefile"; then if ! grep -q "include.*luci.mk\|include.*package.mk" "$makefile"; then
@ -57,6 +69,9 @@ jobs:
fi fi
done done
if [[ $WARNINGS -gt 0 ]]; then
echo "⚠️ Found $WARNINGS warnings (non-blocking)"
fi
if [[ $ERRORS -gt 0 ]]; then if [[ $ERRORS -gt 0 ]]; then
echo "❌ Found $ERRORS errors" echo "❌ Found $ERRORS errors"
exit 1 exit 1