2020-06-11 21:56:20 -07:00
|
|
|
#!/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-11 21:56:20 -07:00
|
|
|
)
|
|
|
|
|
2020-06-12 16:06:32 -07:00
|
|
|
for file in $(git diff --name-only "$TRAVIS_COMMIT_RANGE"); do
|
2020-06-11 21:56:20 -07:00
|
|
|
if [[ $file =~ ^"$1" ]]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "No modifications to $1"
|
|
|
|
exit 1
|