Updated strategy for data files
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# We don't want to commit data files, with the exceptions being our GPG public key and organization logo in PNG & ASCII format.
|
# We don't want to commit data files, with the exceptions being our GPG public key and organization logo in PNG & ASCII format.
|
||||||
result="$(git ls-files | xargs -n 1 file | grep -Ev ASCII\ text\|JSON\|empty\|Unicode\ text | grep -vE '^Resources/logo.png|^Resources/ascii.txt|^Resources/public.gpg')"
|
for file in `git ls-files | xargs -n 1 file | grep -Ev 'ASCII text|JSON|empty|Unicode text|symbolic link' | grep -vE '^Resources/logo.png|^Resources/ascii.txt|^Resources/public.gpg' | cut -f 1 -d :`; do
|
||||||
if [ -n "$result" ]; then
|
if [ "$(du -k "${file}" | awk '{ print $1; }')" -gt 10 ]; then
|
||||||
echo "These files need to be evaluated -- generally, don't commit data files to Git."
|
echo "These files need to be evaluated -- generally, don't commit data files to Git."
|
||||||
echo "$result"
|
echo "$result"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user