DEV: Allow removing local assets after s3 sync (#14013)

DEV: Allow removing local assets after s3 sync (#14013)

diff --git a/lib/tasks/s3.rake b/lib/tasks/s3.rake
index 7f6b0f7..e775e5c 100644
--- a/lib/tasks/s3.rake
+++ b/lib/tasks/s3.rake
@@ -37,6 +37,8 @@ def upload(path, remote_path, content_type, content_encoding = nil)
       helper.upload(file, remote_path, options)
     end
   end
+
+  File.delete(path) if (File.exists?(path) && ENV["DELETE_ASSETS_AFTER_S3_UPLOAD"])
 end
 
 def use_db_s3_config

GitHub sha: b2e4c918187a28b32a2c486305b683cd6f77f68d

This commit appears in #14013 which was approved by eviltrout. It was merged by Falco.