Skip to content

Commit 97b774d

Browse files
authored
Merge pull request #12202 from typhoonzero/fix_apispec_ci
fix set-e exit when checking api
2 parents f9f8fba + d72c53c commit 97b774d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

paddle/scripts/paddle_build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +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"`
337-
echo "checking API.spec change..."
338-
echo "${GIT_PR_ID} , ${API_CHANGE}"
336+
API_CHANGE=`git diff --name-only HEAD^ | grep "paddle/fluid/API.spec" | true`
337+
echo "checking API.spec change, PR: ${GIT_PR_ID}, changes: ${API_CHANGE}"
339338
if [ ${API_CHANGE} ] && [ "${GIT_PR_ID}" != "" ]; then
340339
# TODO: curl -H 'Authorization: token ${TOKEN}'
341340
APPROVALS=`curl -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID}/reviews | \

0 commit comments

Comments
 (0)