|
33 | 33 | export PADDLE_WHL |
34 | 34 | echo "PADDLE_WHL=${PADDLE_WHL}" |
35 | 35 |
|
36 | | -# 2 check code style/format. |
37 | | -/bin/bash ${DIR_PATH}/check_code.sh |
38 | | -if [ $? -ne 0 ];then |
39 | | - echo "code format error" |
40 | | - exit 1 |
41 | | -fi |
42 | | - |
43 | | -need_check_cn_doc_files=$(find_all_cn_api_files_modified_by_pr) |
44 | | -echo $need_check_cn_doc_files |
45 | | -# 3 Chinese api docs check |
46 | | -if [ "${need_check_cn_doc_files}" = "" ] ; then |
47 | | - echo "chinese api doc fileslist is empty, skip check." |
48 | | -else |
49 | | - /bin/bash -x ${DIR_PATH}/check_api_cn.sh "${need_check_cn_doc_files}" |
50 | | - if [ $? -ne 0 ];then |
51 | | - exit 1 |
52 | | - fi |
53 | | -fi |
54 | | - |
55 | | -# 4 build all the Chinese and English docs, and upload them. Controlled with Env BUILD_DOC and UPLOAD_DOC |
| 36 | +# 2 build all the Chinese and English docs, and upload them. Controlled with Env BUILD_DOC and UPLOAD_DOC |
56 | 37 | PREVIEW_URL_PROMPT="ipipe_log_param_preview_url: None" |
57 | 38 | if [ "${BUILD_DOC}" = "true" ] && [ -x /usr/local/bin/sphinx-build ] ; then |
58 | 39 | export OUTPUTDIR=/docs |
@@ -98,8 +79,10 @@ if [ "${BUILD_DOC}" = "true" ] && [ -x /usr/local/bin/sphinx-build ] ; then |
98 | 79 | fi |
99 | 80 | fi |
100 | 81 |
|
101 | | -if [ "${need_check_cn_doc_files}" = "" ] ; then |
102 | | - echo "chinese api doc fileslist is empty, skip check." |
| 82 | +check_parameters=OFF |
| 83 | +if [ "${check_parameters}" = "OFF" ] ; then |
| 84 | + #echo "chinese api doc fileslist is empty, skip check." |
| 85 | + echo "check_api_parameters is not stable, close it temporarily." |
103 | 86 | else |
104 | 87 | jsonfn=${OUTPUTDIR}/en/${VERSIONSTR}/gen_doc_output/api_info_all.json |
105 | 88 | if [ -f $jsonfn ] ; then |
|
113 | 96 | exit 1 |
114 | 97 | fi |
115 | 98 | fi |
| 99 | + |
| 100 | +EXIT_CODE=0 |
| 101 | +# 3 check code style/format. |
| 102 | +/bin/bash ${DIR_PATH}/check_code.sh |
| 103 | +if [ $? -ne 0 ];then |
| 104 | + EXIT_CODE=1 |
| 105 | +fi |
| 106 | + |
| 107 | +need_check_cn_doc_files=$(find_all_cn_api_files_modified_by_pr) |
| 108 | +echo $need_check_cn_doc_files |
| 109 | +# 4 Chinese api docs check |
| 110 | +if [ "${need_check_cn_doc_files}" = "" ] ; then |
| 111 | + echo "chinese api doc fileslist is empty, skip check." |
| 112 | +else |
| 113 | + /bin/bash -x ${DIR_PATH}/check_api_cn.sh "${need_check_cn_doc_files}" |
| 114 | + if [ $? -ne 0 ];then |
| 115 | + EXIT_CODE=1 |
| 116 | + fi |
| 117 | +fi |
| 118 | + |
| 119 | +if [ ${EXIT_CODE} -ne 0 ]; then |
| 120 | + set +x |
| 121 | + echo "==========================================================================================" |
| 122 | + echo "Code style check or API Chinese doc check failed! Please check the error info above carefully." |
| 123 | + echo "==========================================================================================" |
| 124 | + set -x |
| 125 | + exit ${EXIT_CODE} |
| 126 | +fi |
| 127 | + |
116 | 128 | # 5 Approval check |
117 | 129 | /bin/bash ${DIR_PATH}/checkapproval.sh |
118 | 130 | if [ $? -ne 0 ];then |
|
0 commit comments