You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.0 KiB
28 lines
1.0 KiB
#!/bin/bash
|
|
|
|
# CI check script to ensure no new $updateSettings usage is introduced
|
|
# This script will fail CI if any $updateSettings calls are found
|
|
|
|
set -e
|
|
|
|
echo "🔍 Checking for deprecated \$updateSettings usage..."
|
|
|
|
# Search for $updateSettings usage in source files
|
|
USAGE_COUNT=$(grep -r "\$updateSettings" src/ --include="*.vue" --include="*.ts" --include="*.js" | wc -l)
|
|
|
|
if [ "$USAGE_COUNT" -gt 0 ]; then
|
|
echo "❌ Found $USAGE_COUNT usage(s) of deprecated \$updateSettings method:"
|
|
echo ""
|
|
grep -r "\$updateSettings" src/ --include="*.vue" --include="*.ts" --include="*.js" -n
|
|
echo ""
|
|
echo "⚠️ Migration required:"
|
|
echo " - For global settings: use \$saveSettings(changes)"
|
|
echo " - For user-specific settings: use \$saveUserSettings(did, changes)"
|
|
echo " - For current user settings: use \$saveMySettings(changes)"
|
|
echo ""
|
|
echo "Run 'node scripts/migrate-update-settings.js' for migration guidance."
|
|
exit 1
|
|
else
|
|
echo "✅ No \$updateSettings usage found!"
|
|
exit 0
|
|
fi
|
|
|