diff options
author | Andrew Gerrand <adg@golang.org> | 2015-01-25 02:40:49 +1100 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2015-01-24 16:29:45 +0000 |
commit | 39a2d013becdcfa6c1c320818544e27af68cea4c (patch) | |
tree | 7244734b6e6334cd2b57800599267ddf67df1c1b | |
parent | 84312aa521a751f09abebc5bd240a1719f2d1dcf (diff) | |
download | tools-39a2d013becdcfa6c1c320818544e27af68cea4c.tar.gz |
cmd/tipgodoc: set GOROOT_BOOTSTRAP environment variable
Change-Id: I7d5dc5f7510641d2976f2ea6acf0d52cb10b94e8
Reviewed-on: https://go-review.googlesource.com/3266
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r-- | cmd/tipgodoc/Dockerfile | 5 | ||||
-rw-r--r-- | cmd/tipgodoc/tip.go | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/cmd/tipgodoc/Dockerfile b/cmd/tipgodoc/Dockerfile index 23060d3..ac95819 100644 --- a/cmd/tipgodoc/Dockerfile +++ b/cmd/tipgodoc/Dockerfile @@ -1,7 +1,10 @@ -FROM golang +FROM golang:1.4.1 RUN apt-get update && apt-get install --no-install-recommends -y -q build-essential git +# golang puts its go install here (weird but true) +ENV GOROOT_BOOTSTRAP /usr/src/go + # golang sets GOPATH=/go ADD . /go/src/tipgodoc RUN go install tipgodoc diff --git a/cmd/tipgodoc/tip.go b/cmd/tipgodoc/tip.go index 6fc0656..4a92a5c 100644 --- a/cmd/tipgodoc/tip.go +++ b/cmd/tipgodoc/tip.go @@ -151,7 +151,11 @@ func initSide(side, goHash, toolsHash string) (godoc *exec.Cmd, hostport string, } goBin := filepath.Join(goDir, "bin/go") install := exec.Command(goBin, "install", "golang.org/x/tools/cmd/godoc") - install.Env = []string{"GOROOT=" + goDir, "GOPATH=" + filepath.Join(dir, "gopath")} + install.Env = []string{ + "GOROOT=" + goDir, + "GOPATH=" + filepath.Join(dir, "gopath"), + "GOROOT_BOOTSTRAP=" + os.Getenv("GOROOT_BOOTSTRAP"), + } if err := runErr(install); err != nil { return nil, "", err } |