From e7b37b09d4c753cdf081aab9fb7fcd3addcde500 Mon Sep 17 00:00:00 2001 From: "wenmeng.zwm" Date: Mon, 10 Oct 2022 12:03:05 +0800 Subject: [PATCH] do linter test only in alibaba internal env --- .dev_scripts/ci_container_test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.dev_scripts/ci_container_test.sh b/.dev_scripts/ci_container_test.sh index 129a6c25..95088f30 100644 --- a/.dev_scripts/ci_container_test.sh +++ b/.dev_scripts/ci_container_test.sh @@ -9,7 +9,9 @@ git config --global --add safe.directory /Maas-lib # linter test # use internal project for pre-commit due to the network problem -pre-commit run -c .pre-commit-config_local.yaml --all-files +if [ `git remote -v | grep alibaba | wc -l` -gt 1 ]; then + pre-commit run -c .pre-commit-config_local.yaml --all-files +fi if [ $? -ne 0 ]; then echo "linter test failed, please run 'pre-commit run --all-files' to check" exit -1