From 589f77b4bddac84b6ab225cb62b44aa181b53cbd Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Tue, 13 Feb 2024 09:03:33 -0800 Subject: [PATCH] Build: Replace godoc with pkgsite (#3643) Updating the developer tooling to use pkgsite rather than godoc (which isn't installed any more either - so the command fails). --- build/Makefile | 8 ++++---- build/README.md | 6 +++--- build/build-image/Dockerfile | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build/Makefile b/build/Makefile index 17ec8f98b3..63a5ba1741 100644 --- a/build/Makefile +++ b/build/Makefile @@ -746,10 +746,10 @@ shell: $(ensure-build-image) $(DOCKER_RUN_ARGS) \ $(build_tag) bash -l -# run a container with godoc -godoc: - docker run -p 8888:8888 --rm $(common_mounts) -v $(build_path)/.index:/root/.index \ - $(build_tag) godoc -http=":8888" -index=true +# run a container with pkgsite +pkgsite: + docker run -p 8888:8888 --rm $(common_mounts) -w $(workdir_path) \ + $(build_tag) pkgsite -http=":8888" . # start cpu profiling pprof with a web ui pprof-cpu-web: diff --git a/build/README.md b/build/README.md index 16b6aadc39..90aca3df79 100644 --- a/build/README.md +++ b/build/README.md @@ -59,7 +59,7 @@ Table of Contents * [make pprof-cpu-web](#make-pprof-cpu-web) * [make pprof-heap-web](#make-pprof-heap-web) * [make shell](#make-shell) - * [make godoc](#make-godoc) + * [make pkgsite](#make-pkgsite) * [make build-controller-image](#make-build-controller-image) * [make build-agones-sdk-image](#make-build-agones-sdk-image) * [make gen-install](#make-gen-install) @@ -655,8 +655,8 @@ Start the web interface for pprof for heap profiling. #### `make shell` Run a bash shell with the developer tools (go tooling, kubectl, etc) and source code in it. -#### `make godoc` -Run a container with godoc (search index enabled) +#### `make pkgsite` +Run a container with pkgsite on port 8888 #### `make build-controller-image` Compile the gameserver controller and then build the docker image diff --git a/build/build-image/Dockerfile b/build/build-image/Dockerfile index bf7cd27dd8..0f7abd229c 100644 --- a/build/build-image/Dockerfile +++ b/build/build-image/Dockerfile @@ -41,7 +41,8 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c ENV PATH /usr/local/go/bin:/go/bin:$PATH # install go tooling for development, building and testing -RUN go install golang.org/x/tools/cmd/goimports@latest +RUN go install golang.org/x/tools/cmd/goimports@latest && \ + go install golang.org/x/pkgsite/cmd/pkgsite@latest # the kubernetes version for the file ENV KUBERNETES_VER 1.27.6