Update apidiff to check newly created files too (#4967)
This commit is contained in:
parent
0e41b1469d
commit
4c95521faa
|
|
@ -63,13 +63,15 @@ jobs:
|
||||||
# The jApiCmp diff compares current to latest, which isn't appropriate for release branches
|
# 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/') }}
|
if: ${{ !startsWith(github.ref_name, 'release/') && !startsWith(github.base_ref, 'release/') }}
|
||||||
run: |
|
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
|
then
|
||||||
echo "No diff detected."
|
echo "No diff detected."
|
||||||
else
|
else
|
||||||
echo "Diff detected - did you run './gradlew jApiCmp'?"
|
echo "Diff detected - did you run './gradlew jApiCmp'?"
|
||||||
echo $(git diff --name-only)
|
echo $(git diff --cached --name-only)
|
||||||
echo $(git diff)
|
echo $(git diff --cached)
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue