Skip to content

Commit 70f4a3b

Browse files
authored
Merge pull request #12236 from typhoonzero/get_more_accurate_file_changes
Get more accurate file changes
2 parents 6cd727e + b03fac4 commit 70f4a3b

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)