Update apidiff to check newly created files too (#4967)

This commit is contained in:
Trask Stalnaker 2022-11-17 15:45:46 -08:00 committed by GitHub
parent 0e41b1469d
commit 4c95521faa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -63,13 +63,15 @@ jobs:
# The jApiCmp diff compares current to latest, which isn't appropriate for release branches
if: ${{ !startsWith(github.ref_name, 'release/') && !startsWith(github.base_ref, 'release/') }}
run: |
if git diff --quiet
# need to "git add" in case any generated files did not already exist
git add docs/apidiffs
if git diff --cached --quiet
then
echo "No diff detected."
else
echo "Diff detected - did you run './gradlew jApiCmp'?"
echo $(git diff --name-only)
echo $(git diff)
echo $(git diff --cached --name-only)
echo $(git diff --cached)
exit 1
fi