Skip to content

Commit

Permalink
this might be correct
Browse files Browse the repository at this point in the history
  • Loading branch information
jm96441n committed Aug 16, 2024
1 parent e9f7fe9 commit 945b452
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/scripts/goldenfile_checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

set -euo pipefail

echo "origin/$GITHUB_BRANCH_REF"
# check if there is a diff in the xds testdata directory after running `make envoy-regen`
make envoy-regen
echo "regenerating xds files"
make envoy-regen &>/dev/null

echo "origin/$GITHUB_BRANCH_REF"
echo "getting changed files"
echo "calculating changed files"
changed_xds_files=$(git --no-pager diff --name-only HEAD "$(git merge-base HEAD "origin/$GITHUB_BRANCH_REF")" | egrep "agent/xds/testdata/.*" || true)
echo "got changed files"
# If we do not find a file in .changelog/, we fail the check
if [ -z "$changed_xds_files" ]; then
# pass status check if no changes were found for xds files
echo "Found no changes to xds golden files"
exit 0
else
echo "Found diffs with xds golden files run $(make envoy-regen) to update them and check that output is expected"
echo "Found diffs with xds golden files run 'make envoy-regen' to update them and check that output is expected"
exit 0
fi

0 comments on commit 945b452

Please sign in to comment.