Created
May 27, 2018 15:36
-
-
Save abiosoft/d4ba7d7f5f7dc09ebbb16b7574ee5f8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REMOTE=${REMOTE:-"upstream/master"} | |
DOC_EXAMPLE_CHANGE_PATTERN="\ | |
-e ^doc/ \ | |
-e ^examples/ \ | |
-e ^(VERSION|LICENSE)$ \ | |
-e \.md$\ | |
" | |
echo using remote $REMOTE | |
LINES=$(git --no-pager diff --name-only HEAD..$REMOTE | grep -vE $DOC_EXAMPLE_CHANGE_PATTERN | wc -l) | |
if [ $LINES -gt 0 ]; then | |
echo "$LINES files changed" | |
else | |
echo "CI not needed" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment