solana/.travis/affects.sh

19 lines
290 B
Bash
Raw Normal View History

#!/usr/bin/env bash
#
# Check if files in the commit range match a regex
#
(
set -x
2020-06-12 16:06:32 -07:00
git diff --name-only "$TRAVIS_COMMIT_RANGE"
)
2020-06-12 16:06:32 -07:00
for file in $(git diff --name-only "$TRAVIS_COMMIT_RANGE"); do
if [[ $file =~ ^"$1" ]]; then
exit 0
fi
done
echo "No modifications to $1"
exit 1