This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new a0b9011  Run full build when no files were changed over main. (#9221)
a0b9011 is described below

commit a0b9011e7bc29e44c404e7d05666854a3e4dc83c
Author: Andrew Reusch <[email protected]>
AuthorDate: Fri Oct 8 08:00:23 2021 -0700

    Run full build when no files were changed over main. (#9221)
---
 tests/scripts/git_change_docs.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/scripts/git_change_docs.sh b/tests/scripts/git_change_docs.sh
index e623b5d..130f5eb 100755
--- a/tests/scripts/git_change_docs.sh
+++ b/tests/scripts/git_change_docs.sh
@@ -19,6 +19,7 @@
 
 set -eux
 
+FOUND_ONE_FILE=0
 DOCS_DIR=0
 OTHER_DIR=0
 DOC_DIR="docs/"
@@ -26,6 +27,7 @@ DOC_DIR="docs/"
 changed_files=`git diff --no-commit-id --name-only -r origin/main`
 
 for file in $changed_files; do
+    FOUND_ONE_FILE=1
     if grep -q "$DOC_DIR" <<< "$file"; then
         DOCS_DIR=1
     else
@@ -34,9 +36,8 @@ for file in $changed_files; do
     fi
 done
 
-if [ ${OTHER_DIR} -eq 1 ]; then
+if [ ${FOUND_ONE_FILE} -eq 0 -o ${OTHER_DIR} -eq 1 ]; then
     exit 0
 else
     exit 1
 fi
-

Reply via email to