Clean Go cache automatically at build start

This commit is contained in:
Stu Leak 2025-12-09 12:05:27 -05:00
parent b1b5412cdb
commit 16bdf4553f
2 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,8 @@ cd "$PROJECT_ROOT"
echo "🧹 Cleaning previous builds and cache..."
go clean -cache -modcache -testcache 2>/dev/null || true
rm -f "$BUILD_OUTPUT" 2>/dev/null || true
# Also clear build cache directory to avoid permission issues
rm -rf "${GOCACHE:-$HOME/.cache/go-build}" 2>/dev/null || true
echo "✓ Cache cleaned"
echo ""

View File

@ -52,6 +52,8 @@ case "$OS" in
echo "🧹 Cleaning previous builds..."
rm -f VideoTools.exe 2>/dev/null || true
# Clear Go cache to avoid permission issues
go clean -cache -modcache -testcache 2>/dev/null || true
echo "✓ Cache cleaned"
echo ""