Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API validation script on macOS. #80471

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions misc/scripts/validate_extension_api.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -uo pipefail
set -o pipefail

if [ ! -f "version.py" ]; then
echo "Warning: This script is intended to be run from the root of the Godot repository."
Expand All @@ -18,7 +18,7 @@ make_annotation()
local body=$2
local type=$3
local file=$4
if [ ! -v GITHUB_OUTPUT ]; then
if [[ "$GITHUB_OUTPUT" == "" ]]; then
echo "$title"
echo "$body"
else
Expand All @@ -43,8 +43,8 @@ while read -r file; do
awk '/^Validate extension JSON:/' - < "$file" | sort > "$allowed_errors"

# Differences between the expected and actual errors
new_validation_error="$(comm "$validation_output" "$allowed_errors" -23)"
obsolete_validation_error="$(comm "$validation_output" "$allowed_errors" -13)"
new_validation_error="$(comm -23 "$validation_output" "$allowed_errors")"
obsolete_validation_error="$(comm -13 "$validation_output" "$allowed_errors")"

if [ -n "$obsolete_validation_error" ]; then
make_annotation "The following validation errors no longer occur (compared to $reference_tag):" "$obsolete_validation_error" warning "$file"
Expand Down