summaryrefslogtreecommitdiffstats
path: root/misc/scripts/validate_extension_api.sh
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-10-21 12:04:31 -0400
committerSpartan322 <Megacake1234@gmail.com>2024-10-22 10:20:24 -0400
commit48622f71de1a95bc3f1fc434bdf6e1aa3c258dcb (patch)
tree780f8e45872886e9929f20b757005dd94de1a742 /misc/scripts/validate_extension_api.sh
parent9a49cab65c8e8ed8ac5f0613d96ddde403d12728 (diff)
downloadredot-engine-48622f71de1a95bc3f1fc434bdf6e1aa3c258dcb.tar.gz
Rebrand extension API validation
Diffstat (limited to 'misc/scripts/validate_extension_api.sh')
-rwxr-xr-xmisc/scripts/validate_extension_api.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/misc/scripts/validate_extension_api.sh b/misc/scripts/validate_extension_api.sh
index db2d053f73..aa0d6b7155 100755
--- a/misc/scripts/validate_extension_api.sh
+++ b/misc/scripts/validate_extension_api.sh
@@ -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