Signed-off-by: David Galloway <dgallowa@redhat.com>
#!/bin/bash -e
-docs_pr_only
-if [ "$DOCS_ONLY" = true ]; then
- echo "Only the doc/ dir changed. No need to run make check or API tests."
+skip_make_check
+if [ "$SKIP_MAKE_CHECK" = true ]; then
+ echo "Only the doc/, .github, or qa/ dir changed. No need to run make check or API tests."
exit 0
fi
#!/bin/bash -ex
-docs_pr_only
-if [ "$DOCS_ONLY" = true ]; then
- echo "Only the doc/ dir changed. No need to run make check."
+skip_make_check
+if [ "$SKIP_MAKE_CHECK" = true ]; then
+ echo "Only the doc/, .github, or qa/ dir changed. No need to run make check or API tests."
exit 0
fi
}
# NOTE: This function will only work on a Pull Request job!
-docs_pr_only() {
+skip_make_check() {
pushd .
# Only try to cd to ceph repo if we need to.
# The ceph-pr-commits job checks out ceph.git and ceph-build.git but most
files="$(git diff --name-only origin/${ghprbTargetBranch}...origin/pr/${ghprbPullId}/head)"
fi
echo -e "changed files:\n$files"
- if [ $(echo "$files" | grep -v '^doc/' | wc -l) -gt 0 ]; then
- DOCS_ONLY=false
+ if [ $(echo "$files" | grep -v '^doc/\|^.github\|^qa/' | wc -l) -gt 0 ]; then
+ SKIP_MAKE_CHECK=false
else
- DOCS_ONLY=true
+ SKIP_MAKE_CHECK=true
fi
popd
}