From 5c8e88d6d29569e90cc9abcb9a1677d935b2e8c0 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Wed, 14 Mar 2012 23:47:34 +1100 Subject: [PATCH] misc/dist: remove exp and old before building Fixes #3317. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5784074 --- misc/dist/bindist.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/dist/bindist.go b/misc/dist/bindist.go index 2b7d3b1c7b..b7f7df7b1e 100644 --- a/misc/dist/bindist.go +++ b/misc/dist/bindist.go @@ -42,6 +42,11 @@ const ( uploadURL = "https://go.googlecode.com/files" ) +var preBuildCleanFiles = []string{ + "src/pkg/exp", + "src/pkg/old", +} + var cleanFiles = []string{ ".hg", ".hgtags", @@ -117,6 +122,11 @@ func (b *Build) Do() error { return err } + // Remove exp and old packages. + if err := b.clean(preBuildCleanFiles); err != nil { + return err + } + src := filepath.Join(b.root, "src") if b.Source { if runtime.GOOS == "windows" { -- 2.50.0