Update wiki_sync.py and process-wiki-system-changes to remove astronomical_id references. Add migrate-s-to-gj.py migration script. Update generate-stubs.py and validate-ron for new schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
959 B
Bash
Executable File
34 lines
959 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# RON content validator — wrapper for the Rust validate_ron binary (#611).
|
|
#
|
|
# Usage:
|
|
# tooling/validate-ron <file.ron> <zone|culture>
|
|
#
|
|
# Examples:
|
|
# tooling/validate-ron content/global/zone-identity-spec.example.ron zone
|
|
# tooling/validate-ron content/global/culture-van-maanens-star.example.ron culture
|
|
|
|
set -euo pipefail
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo "Usage: tooling/validate-ron <file.ron> <zone|culture>"
|
|
echo ""
|
|
echo "Validates a RON file against the Rust struct schema."
|
|
echo "Schema types:"
|
|
echo " zone — ZoneSpec (zone identity spec)"
|
|
echo " culture — CultureProfile (culture profile)"
|
|
exit 1
|
|
fi
|
|
|
|
# Check file exists before resolving — realpath gives unhelpful errors otherwise
|
|
if [ ! -f "$1" ]; then
|
|
echo "Error: file not found: $1"
|
|
exit 1
|
|
fi
|
|
|
|
FILE="$(realpath "$1")"
|
|
SCHEMA="$2"
|
|
|
|
cd "$(dirname "$0")/../server"
|
|
exec cargo run --quiet --bin validate_ron -- "$FILE" "$SCHEMA"
|