mirror of
https://github.com/prymitive/karma
synced 2026-08-28 11:17:28 +00:00
fix(ci): prune GOCACHE if it gets too big
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
|
||||
GOCACHE=$(go env GOCACHE)
|
||||
SIZE=`du -sxm ${GOCACHE} | awk '{print $1}'`
|
||||
echo "GOCACHE size: ${SIZE}MB"
|
||||
|
||||
if [ $SIZE -gt 3500 ]; then
|
||||
echo "Pruning GOCACHE at ${GOCACHE}"
|
||||
find "${GOCACHE}" -type f -delete
|
||||
fi
|
||||
Reference in New Issue
Block a user