nextcloud-android/scripts/checkIfRunDrone.sh
tobiasKaminsky a9473d6158
Fix drone check due to app subfolder
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2022-04-13 10:18:21 +02:00

15 lines
412 B
Bash
Executable file

#!/bin/sh -e
if [ -z $3 ] ; then
echo "Merge commit to master -> continue with CI"
exit 0
fi
export BRANCH=$(scripts/analysis/getBranchBase.sh $1 $2 $3 | sed s'/"//'g)
if [ $(git diff --name-only origin/$BRANCH | grep -cE "^app/src|screenshots|build.gradle|.drone.yml") -eq 0 ] ; then
echo "No source files changed"
exit 1
else
echo "Source files changed -> continue with CI"
exit 0
fi