[release-branch.go1.11] cmd/godoc: add missing Dockerfile ARG

Also moves the ARG declarations immediately before they're used to
make this omission less likely for future additions.

Updates golang/go#28893

Change-Id: Id52a936d978f96d3c629feff69fc9dc4ae1b8463
Reviewed-on: https://go-review.googlesource.com/c/140377
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/150684
This commit is contained in:
Chris Broadfoot 2018-10-06 17:12:19 -07:00 committed by Dmitri Shuralyov
parent d297d4d5a0
commit f1c3f9758c
1 changed files with 4 additions and 3 deletions

View File

@ -36,14 +36,15 @@ RUN go build -o /godoc -tags=golangorg golang.org/x/tools/cmd/godoc
RUN cd /goroot && git clean -xdf
# Add build metadata.
ARG TOOLS_HEAD
ARG TOOLS_CLEAN
ARG DOCKER_TAG
RUN cd /goroot && echo "go repo HEAD: $(git rev-parse HEAD)" >> /goroot/buildinfo
RUN echo "requested go ref: ${GO_REF}" >> /goroot/buildinfo
ARG TOOLS_HEAD
RUN echo "x/tools HEAD: ${TOOLS_HEAD}" >> /goroot/buildinfo
ARG TOOLS_CLEAN
RUN echo "x/tools clean: ${TOOLS_CLEAN}" >> /goroot/buildinfo
ARG DOCKER_TAG
RUN echo "image: ${DOCKER_TAG}" >> /goroot/buildinfo
ARG BUILD_ENV
RUN echo "build env: ${BUILD_ENV}" >> /goroot/buildinfo
RUN rm -rf /goroot/.git