Files
plex-playlist/scripts/quick-renovate-check.sh
Cliff Hill 4454e9aef5
Some checks failed
Tests / Build and Push CICD Base Image (push) Successful in 1m7s
Tests / Build and Push CICD Complete Image (push) Successful in 34m29s
Tests / YAML Syntax Check (push) Successful in 46s
Tests / Mixed Line Ending Check (push) Successful in 35s
Tests / TOML Formatting Check (push) Successful in 42s
Tests / Ruff Linting (push) Successful in 36s
Tests / Ruff Format Check (push) Successful in 36s
Tests / Pyright Type Check (push) Successful in 1m2s
Tests / Darglint Docstring Check (push) Successful in 48s
Tests / No Docstring Types Check (push) Successful in 31s
Tests / ESLint Check (push) Successful in 1m1s
Tests / Prettier Format Check (push) Successful in 44s
Tests / TypeScript Type Check (push) Successful in 1m18s
Tests / TSDoc Lint Check (push) Successful in 1m3s
Tests / Backend Tests (push) Successful in 49s
Tests / Frontend Tests (push) Successful in 1m39s
Tests / Backend Doctests (push) Successful in 35s
Tests / End-to-End Tests (push) Successful in 7m58s
Tests / Trailing Whitespace Check (push) Successful in 30m11s
Tests / Integration Tests (push) Failing after 22m6s
Tests / TOML Syntax Check (push) Failing after 38m33s
Tests / End of File Check (push) Successful in 41m46s
Adding renovate stuff.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
2025-11-04 12:40:53 -05:00

110 lines
3.3 KiB
Bash

#!/bin/bash
# Quick Renovate JSON Validator
# Simple validation that doesn't require Renovate installation
echo "🔍 Quick Renovate Configuration Check"
echo "====================================="
# Check if renovate.json exists
if [ ! -f "renovate.json" ]; then
echo "❌ renovate.json not found in current directory"
exit 1
fi
echo "✓ Found renovate.json"
# Validate JSON syntax with Node.js (should be available)
if command -v node &> /dev/null; then
echo ""
echo "🔧 Validating JSON syntax..."
if node -e "
try {
const config = JSON.parse(require('fs').readFileSync('renovate.json', 'utf8'));
console.log('✓ JSON syntax is valid');
console.log('✓ Configuration has', Object.keys(config).length, 'top-level properties');
// Check for required/recommended fields
if (config.extends) {
console.log('✓ Base configuration extends:', config.extends);
}
if (config.schedule) {
console.log('✓ Update schedule configured');
}
if (config.packageRules) {
console.log('✓ Package rules defined:', config.packageRules.length, 'rules');
}
} catch(e) {
console.error('❌ JSON syntax error:', e.message);
process.exit(1);
}"; then
echo "✓ JSON validation passed"
else
echo "❌ JSON validation failed"
exit 1
fi
else
echo "⚠️ Node.js not available, skipping JSON validation"
fi
# Check for supported package files
echo ""
echo "📋 Checking for supported package managers..."
PACKAGE_FILES_FOUND=0
# Python (uv/pip)
if [ -f "backend/pyproject.toml" ]; then
echo "✓ Python: backend/pyproject.toml"
PACKAGE_FILES_FOUND=$((PACKAGE_FILES_FOUND + 1))
fi
# Node.js (npm/yarn)
if [ -f "frontend/package.json" ]; then
echo "✓ Node.js: frontend/package.json"
PACKAGE_FILES_FOUND=$((PACKAGE_FILES_FOUND + 1))
# Check for yarn.lock
if [ -f "frontend/yarn.lock" ]; then
echo " └─ Yarn PnP detected (yarn.lock present)"
fi
fi
# Docker
DOCKERFILE_COUNT=$(find . -name "Dockerfile*" -type f | wc -l)
if [ $DOCKERFILE_COUNT -gt 0 ]; then
echo "✓ Docker: $DOCKERFILE_COUNT Dockerfile(s) found"
find . -name "Dockerfile*" -type f | head -3 | sed 's|^./| └─ |'
if [ $DOCKERFILE_COUNT -gt 3 ]; then
echo " └─ ... and $((DOCKERFILE_COUNT - 3)) more"
fi
PACKAGE_FILES_FOUND=$((PACKAGE_FILES_FOUND + 1))
fi
# GitHub Actions / Gitea Actions
WORKFLOW_COUNT=$(find .gitea/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null | wc -l)
if [ $WORKFLOW_COUNT -gt 0 ]; then
echo "✓ Gitea Actions: $WORKFLOW_COUNT workflow(s) found"
fi
if [ $PACKAGE_FILES_FOUND -eq 0 ]; then
echo "⚠️ No supported package files found"
echo " Renovate looks for: pyproject.toml, package.json, Dockerfile, etc."
else
echo "✓ Found $PACKAGE_FILES_FOUND package manager types to monitor"
fi
echo ""
echo "🚀 Status: Basic configuration validation complete!"
echo ""
echo "📋 Next steps:"
echo " 1. Add RENOVATE_TOKEN secret to your Gitea repository"
echo " 2. Enable .gitea/workflows/renovate.yml workflow"
echo " 3. Test with manual workflow trigger (dry-run mode)"
echo ""
echo "📚 For full validation, see: docs/RENOVATE_SETUP_GUIDE.md"
echo ""
echo "✅ Quick validation complete!"