mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01:00
In this commit, we add a call to "go clean -cache" after each platform build in the release script to prevent the Go build cache from accumulating unbounded disk space during the sequential 15-platform build process. When building for multiple platforms in sequence with "go build -v", Go creates intermediate build artifacts and caches compiled packages for each target platform. While this caching improves build performance within a single platform build, it causes the cache to grow substantially when building for many platforms sequentially. With 15 different platform/ architecture combinations, each with their own cached artifacts, this accumulation was contributing to the disk space exhaustion. By clearing the build cache after each platform completes, we prevent this unbounded growth while still allowing each individual platform build to benefit from caching during its own compilation. The module cache is preserved (we only clear the build cache), so dependencies don't need to be re-downloaded between platforms.