Skip to content

Commit b03fac4

Browse files
committed
get more accurate file changes
1 parent 72f66bd commit b03fac4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddle/scripts/paddle_build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ function assert_api_not_changed() {
333333
python ${PADDLE_ROOT}/tools/diff_api.py ${PADDLE_ROOT}/paddle/fluid/API.spec new.spec
334334
deactivate
335335

336-
API_CHANGE=`git diff --name-only HEAD^ | grep "paddle/fluid/API.spec" || true`
336+
# Use git diff --name-only HEAD^ may not get file changes for update commits in one PR
337+
API_CHANGE=`echo $CHANGED_FILES | grep "paddle/fluid/API.spec" || true`
337338
echo "checking API.spec change, PR: ${GIT_PR_ID}, changes: ${API_CHANGE}"
338339
if [ ${API_CHANGE} ] && [ "${GIT_PR_ID}" != "" ]; then
339340
# TODO: curl -H 'Authorization: token ${TOKEN}'

0 commit comments

Comments
 (0)