Some checks failed
Sign Plugins / sign (push) Failing after 32s
- GitHub Actions workflows for signing and validation - Example file-manager plugin - Scripts for batch signing
30 lines
636 B
Bash
Executable File
30 lines
636 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
ERRORS=0
|
|
|
|
for manifest in plugins/*/manifest.json; do
|
|
[ -f "$manifest" ] || continue
|
|
dir=$(dirname "$manifest")
|
|
name=$(basename "$dir")
|
|
|
|
echo "Validating: $name"
|
|
|
|
# 检查必需字段
|
|
for field in name version description; do
|
|
val=$(jq -r ".$field" "$manifest")
|
|
if [ "$val" = "null" ] || [ -z "$val" ]; then
|
|
echo " Error: missing $field"
|
|
ERRORS=$((ERRORS + 1))
|
|
fi
|
|
done
|
|
|
|
# 检查 plugin.js 存在
|
|
if [ ! -f "$dir/plugin.js" ]; then
|
|
echo " Error: plugin.js not found"
|
|
ERRORS=$((ERRORS + 1))
|
|
fi
|
|
done
|
|
|
|
exit $ERRORS
|