debian-mirror-gitlab/scripts/clean-old-cached-assets

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
443 B
Text
Raw Normal View History

2020-05-24 23:13:21 +05:30
#!/usr/bin/env bash
2019-03-02 22:35:43 +05:30
2019-09-04 21:01:54 +05:30
# Clean up cached files that are older than 4 days
find tmp/cache/assets/sprockets/ -type f -mtime +4 -execdir rm -- "{}" \;
2020-04-08 14:13:33 +05:30
find tmp/cache/webpack-dlls/ -maxdepth 1 -type d -mtime +4 -exec rm -rf -- "{}" \;
2019-03-02 22:35:43 +05:30
du -d 0 -h tmp/cache/assets/sprockets | cut -f1 | xargs -I % echo "tmp/cache/assets/sprockets/ is currently %"
2020-04-08 14:13:33 +05:30
du -d 0 -h tmp/cache/webpack-dlls | cut -f1 | xargs -I % echo "tmp/cache/webpack-dlls is currently %"