Created
June 29, 2023 08:21
-
-
Save axi92/2e7f76cb7f4e7b65f046093b4e676b36 to your computer and use it in GitHub Desktop.
Check git for not allowed binaries
This file contains hidden or 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
#!/bin/bash | |
# set -e | |
ERRORS=$(grep -rIL --exclude-dir=.git --exclude=*.png --exclude=*.jpg --exclude=*.crt --exclude=*.ttf . | wc -l) | |
if [ $ERRORS -gt "0" ]; then | |
echo '########################################' | |
echo 'Not allowed binaries are found in repo!' | |
echo 'Remove them:' | |
echo '' | |
grep -rIL --exclude-dir=.git --exclude=*.png --exclude=*.jpg --exclude=*.crt --exclude=*.ttf . | |
echo '' | |
echo '########################################' | |
exit 1; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment