未验证 提交 ad88cbb8 编写于 作者: S Sing_chan 提交者: GitHub

test=document_fix;pre install clang-format to avoid repeat installation due to...

test=document_fix;pre install clang-format to avoid repeat installation due to pre-commit multi-thread running (#43734)
上级 3901b2cf
......@@ -19,6 +19,16 @@ if ! [[ $(pre-commit --version) == *"2.17.0"* ]]; then
pip install pre-commit==2.17.0 1>nul
fi
# Install clang-format before git commit to avoid repeat installation due to
# pre-commit multi-thread running.
readonly VERSION="13.0.0"
version=$(clang-format -version)
if ! [[ $(python -V 2>&1 | awk '{print $2}' | awk -F '.' '{print $1$2}') -ge 36 ]]; then
echo "clang-format installation by pip need python version great equal 3.6,
please change the default python to higher version."
exit 1
fi
diff_files=$(git diff --numstat ${BRANCH} | awk '{print $NF}')
echo -e "diff files between pr and ${BRANCH}:\n${diff_files}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册