Skip to content

Commit

Permalink
cmd/release: clean gocache and tmp in source mode too
Browse files Browse the repository at this point in the history
I missed this in CL 159257 when fixing golang/go#29906 the first time.

Fixes golang/go#30181 (round two)

Change-Id: Iae90b5b19803e1ef7297b57bae7644e16c44efdc
Reviewed-on: https://go-review.googlesource.com/c/161967
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
bradfitz committed Feb 12, 2019
1 parent a528637 commit e6f0055
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,15 @@ func (b *Build) make() error {

if b.Source {
b.logf("Skipping build.")

// Remove unwanted top-level directories and verify only "go" remains:
if err := client.RemoveAll("tmp", "gocache"); err != nil {
return err
}
if err := b.checkTopLevelDirs(client); err != nil {
return fmt.Errorf("verifying no unwanted top-level directories: %v", err)
}

return b.fetchTarball(client)
}

Expand Down

0 comments on commit e6f0055

Please sign in to comment.