]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dist: remove exp and old before building
authorAndrew Gerrand <adg@golang.org>
Wed, 14 Mar 2012 12:47:34 +0000 (23:47 +1100)
committerAndrew Gerrand <adg@golang.org>
Wed, 14 Mar 2012 12:47:34 +0000 (23:47 +1100)
Fixes #3317.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5784074

misc/dist/bindist.go

index 2b7d3b1c7b3ee2d960c8b508aef0793e4a4e1e10..b7f7df7b1e2028e0ac058e9bac0bf5e17ae9d96c 100644 (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" {