scripts: use ephemeral gocache in check-each-commit

This commit is contained in:
Andras Banki-Horvath committed 2026-02-13 09:42:24 +01:00
1 parent aeac3380ac
commit 75de3e3b68
1 file changed
+9
+9
View File
@@ -12,4 +12,13 @@ if [[ "$(git log --pretty="%H %D" | grep "^[0-9a-f]*.* $1")" = "" ]]; then
echo "It seems like the current checked-out commit is not based on $1"
exit 1
fi
# Keep build cache ephemeral for this run to avoid long-term disk growth.
TMP_GOCACHE=$(mktemp -d -t lnd-check-commit-gocache.XXXXXX)
cleanup() {
rm -rf "$TMP_GOCACHE"
}
trap cleanup EXIT
export GOCACHE="$TMP_GOCACHE"
git rebase --exec scripts/check-commit.sh $1