2019-07-22 15:55:49 +03:00
|
|
|
#!/bin/sh -e
|
2019-07-12 14:59:50 +03:00
|
|
|
|
2022-05-31 11:07:03 +03:00
|
|
|
PR_NUMBER=$1
|
|
|
|
|
|
|
|
if [ -z "$PR_NUMBER" ] ; then
|
2019-07-25 12:54:12 +03:00
|
|
|
echo "Merge commit to master -> continue with CI"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2022-05-31 11:07:03 +03:00
|
|
|
export BRANCH=$(scripts/analysis/getBranchBase.sh "$PR_NUMBER" | sed 's/"//g')
|
2024-01-28 23:26:21 +03:00
|
|
|
if [ "$(git diff --name-only "origin/$BRANCH" | grep -cE "^app/src|screenshots|build.gradle|.drone.yml|gradle")" -eq 0 ] ; then
|
2019-07-22 15:55:49 +03:00
|
|
|
echo "No source files changed"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "Source files changed -> continue with CI"
|
|
|
|
exit 0
|
|
|
|
fi
|