mirror of
https://github.com/nextcloud/server.git
synced 2026-07-15 04:51:46 -04:00
chore(assets): Ignore git-ignored directories on image optimization
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
8a79636bcb
commit
64843c24ef
1 changed files with 16 additions and 0 deletions
|
|
@ -30,8 +30,19 @@ function recursive_optimize_images() {
|
|||
DIR_NAME=${PWD##*/}
|
||||
|
||||
if [[ "$DIR_NAME" == "node_modules" ]]; then
|
||||
echo "Ignoring node_modules for image optimization"
|
||||
return
|
||||
elif [[ "$DIR_NAME" == "tests" ]]; then
|
||||
echo "Ignoring tests for image optimization"
|
||||
return
|
||||
elif [[ "$DIR_NAME" == "3rdparty" ]]; then
|
||||
echo "Ignoring 3rdparty for image optimization"
|
||||
return
|
||||
elif [[ "$DIR_NAME" == "vendor" ]]; then
|
||||
echo "Ignoring vendor for image optimization"
|
||||
return
|
||||
elif [[ "$DIR_NAME" == "vendor-bin" ]]; then
|
||||
echo "Ignoring vendor-bin for image optimization"
|
||||
return
|
||||
fi
|
||||
|
||||
|
|
@ -75,6 +86,11 @@ function recursive_optimize_images() {
|
|||
[[ -e "$dir" ]] || break
|
||||
|
||||
if [[ -d "$dir" ]]; then
|
||||
if git check-ignore $dir -q ; then
|
||||
echo "$dir is not shipped. Ignoring image optimization"
|
||||
continue
|
||||
fi
|
||||
|
||||
recursive_optimize_images "$dir"
|
||||
cd ..
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue