Skip to content

Commit

Permalink
Run full build when no files were changed over main. (apache#9221)
Browse files Browse the repository at this point in the history
  • Loading branch information
areusch authored Oct 8, 2021
1 parent 88b2be8 commit a0b9011
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/scripts/git_change_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@

set -eux

FOUND_ONE_FILE=0
DOCS_DIR=0
OTHER_DIR=0
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
Expand All @@ -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

0 comments on commit a0b9011

Please sign in to comment.