From 33e689645a899e39b7f9d6e3a0c56fd1d99cc1f2 Mon Sep 17 00:00:00 2001 From: irinaschubert Date: Wed, 27 Apr 2022 09:02:50 +0200 Subject: [PATCH] fix: Cleaning sipi tmp folder results in an error when there are lots of files (DEV-316) (#2052) --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c866770656..3c651e143c 100644 --- a/Makefile +++ b/Makefile @@ -280,12 +280,15 @@ clean-local-tmp: @rm -rf .tmp @mkdir .tmp -clean: docs-clean clean-local-tmp clean-docker ## clean build artifacts +clean: docs-clean clean-local-tmp clean-docker clean-sipi-tmp ## clean build artifacts @rm -rf .env .PHONY: clean-sipi-tmp clean-sipi-tmp: ## deletes all files in Sipi's tmp folder - @rm -rf sipi/images/tmp/* + @mkdir empty_folder_for_clean_sipi_tmp + @cp sipi/images/tmp/.gitignore empty_folder_for_clean_sipi_tmp/.gitignore + @rsync -a --delete empty_folder_for_clean_sipi_tmp/ sipi/images/tmp/ # use rsync because it can handle large number of files + @rm -r empty_folder_for_clean_sipi_tmp .PHONY: clean-sipi-projects clean-sipi-projects: ## deletes all files uploaded within a project