Skip to content

Commit

Permalink
Merge pull request #768 from Spartan322/rebrand/extension_api_validation
Browse files Browse the repository at this point in the history
Rebrand extension API validation
  • Loading branch information
Spartan322 authored Oct 22, 2024
2 parents c5d923d + 48622f7 commit f500692
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions misc/scripts/validate_extension_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,14 @@ while read -r file; do
expected_errors="$(mktemp)"
get_expected_output "$file"

# Download the reference extension_api.json
wget -nv --retry-on-http-error=503 --tries=5 --timeout=60 -cO "$reference_file" "https://raw.githubusercontent.com/godotengine/godot-cpp/godot-$reference_tag/gdextension/extension_api.json" || has_problems=1
if [[ $file == *redot* ]]; then
# Download the Redot reference extension_api.json
wget -nv --retry-on-http-error=503 --tries=5 --timeout=60 -cO "$reference_file" "https://raw.githubusercontent.com/Redot-Engine/redot-cpp/$reference_tag/gdextension/extension_api.json" || has_problems=1
else
# Download the Godot reference extension_api.json
wget -nv --retry-on-http-error=503 --tries=5 --timeout=60 -cO "$reference_file" "https://raw.githubusercontent.com/Redot-Engine/redot-cpp/godot-$reference_tag/gdextension/extension_api.json" || has_problems=1
fi

# Validate the current API against the reference
"$1" --headless --validate-extension-api "$reference_file" 2>&1 | tee "$validate" | awk '!/^Validate extension JSON:/' - || true
# Collect the expected and actual validation errors
Expand Down

0 comments on commit f500692

Please sign in to comment.