misc/dist: clean files from GOPATH after building tour

Fixes #5503.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/10989043
This commit is contained in:
Andrew Gerrand 2013-07-08 11:45:33 +10:00
parent 8b16a8bbc1
commit 47a89693e9

View File

@ -409,6 +409,13 @@ func (b *Build) Do() error {
} }
func (b *Build) tour() error { func (b *Build) tour() error {
defer func() {
// Clean work files from GOPATH directory.
for _, d := range []string{"bin", "pkg", "src"} {
os.RemoveAll(filepath.Join(b.gopath, d))
}
}()
// go get the gotour package. // go get the gotour package.
_, err := b.run(b.gopath, filepath.Join(b.root, "bin", "go"), "get", *tourPath+"/gotour") _, err := b.run(b.gopath, filepath.Join(b.root, "bin", "go"), "get", *tourPath+"/gotour")
if err != nil { if err != nil {