Merge pull request #10576 from bhandras/bh/ephemeral-gocache-check-each-commit

scripts: use ephemeral gocache in check-each-commit
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2026-02-17 17:28:06 -08:00
commit ba4778321d
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