Skip to content
Snippets Groups Projects

ignore-file-size-gitlfs

Merged Martin Schroschk requested to merge ignore-file-size-gitlfs into preview
1 unresolved thread
@@ -34,17 +34,12 @@
@@ -34,17 +34,12 @@
large_files_present=false
large_files_present=false
branch="origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-preview}"
branch="origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-preview}"
source_hash=`git merge-base HEAD "$branch"`
source_hash=`git merge-base HEAD "$branch"`
lfsfiles=$(git lfs ls-files -n)
lfsfiles=$(git lfs ls-files -n)
for f in $(git diff $source_hash --name-only); do
for f in $(git diff $source_hash --name-only); do
# Do not check size of git lfs files.
# Do not check size of git lfs files.
# This is a bit "Going around your elbow to get to your ear" by assuming that lfs files are
# ending with webm or mp4
#if [[ "$f" =~ .*".webm" ]] || [[ "$f" =~ .*".mp4" ]] ; then
echo $f
if [[ $lfsfiles =~ "$f" ]]; then
if [[ $lfsfiles =~ "$f" ]]; then
echo "Skip file ${f} in webm or mp4 format cause it is a git lfs file."
echo "Skip file ${f} because it is a git lfs file."
continue
continue
fi
fi
fs=$(wc -c $f | awk '{print $1}')
fs=$(wc -c $f | awk '{print $1}')
Loading