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:
1 file changed
+9
@@ -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"
|
echo "It seems like the current checked-out commit is not based on $1"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
git rebase --exec scripts/check-commit.sh $1
|
||||||
Reference in new issue
Block a user