Skip to content
Snippets Groups Projects
Commit d0334340 authored by Martin Schroschk's avatar Martin Schroschk
Browse files

Add git lfs to container and check for lfs files explicitly

parent fc6f5359
No related branches found
No related tags found
2 merge requests!679Automated merge from preview to main,!658ignore-file-size-gitlfs
...@@ -12,7 +12,7 @@ RUN pip install mkdocs>=1.1.2 mkdocs-material>=7.1.0 mkdocs-htmlproofer-plugin== ...@@ -12,7 +12,7 @@ RUN pip install mkdocs>=1.1.2 mkdocs-material>=7.1.0 mkdocs-htmlproofer-plugin==
# Linter # # Linter #
########## ##########
RUN apt-get update && apt-get install -y nodejs npm aspell git RUN apt-get update && apt-get install -y nodejs npm aspell git git-lfs
RUN npm install -g markdownlint-cli markdown-link-check RUN npm install -g markdownlint-cli markdown-link-check
......
...@@ -35,11 +35,15 @@ large_files_present=false ...@@ -35,11 +35,15 @@ 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)
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 # This is a bit "Going around your elbow to get to your ear" by assuming that lfs files are
# ending with webm or mp4 # ending with webm or mp4
if [[ "$f" =~ .*".webm" ]] || [[ "$f" =~ .*".mp4" ]] ; then #if [[ "$f" =~ .*".webm" ]] || [[ "$f" =~ .*".mp4" ]] ; then
echo $f
if [[ $lfsfiles =~ "$f" ]]; then
echo "Skip file ${f} in webm or mp4 format cause it is a git lfs file." echo "Skip file ${f} in webm or mp4 format cause it is a git lfs file."
continue continue
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment