diff options
author | Rémy Coutable <remy@rymai.me> | 2019-01-21 20:20:38 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-02-05 14:04:54 +0100 |
commit | 6b39f55d3f0ba0d48e920693c4d5128e26769a1c (patch) | |
tree | a55eae5d31118fa44d902a932ea638163356d3ed /scripts | |
parent | 31fc5965baf9ca23a1da4a0ffc350102fe4c89c6 (diff) | |
download | gitlab-ce-6b39f55d3f0ba0d48e920693c4d5128e26769a1c.tar.gz |
Add cache to the 'compile-assets' and 'gitlab:assets:compile' jobs
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/clean-old-cached-assets | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/clean-old-cached-assets b/scripts/clean-old-cached-assets new file mode 100755 index 00000000000..7a3a62a477a --- /dev/null +++ b/scripts/clean-old-cached-assets @@ -0,0 +1,6 @@ +#!/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 %" |