misc/dist: remove exp and old before building

Fixes #3317.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5784074
This commit is contained in:
Andrew Gerrand 2012-03-14 23:47:34 +11:00
parent 2fc5dd66df
commit 5c8e88d6d2
1 changed files with 10 additions and 0 deletions

10
misc/dist/bindist.go vendored
View File

@ -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" {