gitlab-org--gitlab-foss/scripts/clean-old-cached-assets
Rémy Coutable 6b39f55d3f
Add cache to the 'compile-assets' and 'gitlab:assets:compile' jobs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-02-05 14:04:54 +01:00

6 lines
250 B
Bash
Executable file

#!/bin/bash
# Clean up cached files that are older than 1 week
find tmp/cache/assets/sprockets/ -type f -mtime +7 -execdir rm -- "{}" \;
du -d 0 -h tmp/cache/assets/sprockets | cut -f1 | xargs -I % echo "tmp/cache/assets/sprockets/ is currently %"