diff --git a/.github/scripts/goldenfile_checker.sh b/.github/scripts/goldenfile_checker.sh index 0fef83fa68f2..5381628abbef 100755 --- a/.github/scripts/goldenfile_checker.sh +++ b/.github/scripts/goldenfile_checker.sh @@ -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