Skip to content

Commit

Permalink
Allow-list a few more png files on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Dec 16, 2024
1 parent 248a30b commit 6145b55
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/png_only_on_lfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,18 @@ jobs:
- name: Check that png files are on git LFS
run: |
binary_extensions="png"
exclude="crates/eframe/data"
exclude_paths=(
"crates/eframe/data"
"crates/egui_demo_lib/data/"
"crates/egui/assets/"
)
# Find binary files that are not tracked by Git LFS
for ext in $binary_extensions; do
if comm -23 <(git ls-files | grep -v "^$exclude" | sort) <(git lfs ls-files -n | sort) | grep "\.${ext}$"; then
# Create grep pattern to exclude multiple paths
exclude_pattern=$(printf "|^%s" "${exclude_paths[@]}" | sed 's/^|//')
if comm -23 <(git ls-files | grep -Ev "$exclude_pattern" | sort) <(git lfs ls-files -n | sort) | grep "\.${ext}$"; then
echo "Error: Found binary file with extension .$ext not tracked by git LFS. See CONTRIBUTING.md"
exit 1
fi
Expand Down

0 comments on commit 6145b55

Please sign in to comment.