Skip to content

Commit

Permalink
chore: update protoc-gen-doc
Browse files Browse the repository at this point in the history
`protoc-gen-doc` was using `pseudomuto/protoc-gen-doc` image which was
running go 1.17. Update to use `go install` from source like other
tools.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Aug 20, 2024
1 parent ee4290f commit fe52cb0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,12 @@ RUN --mount=type=cache,target=/.cache go install github.com/siderolabs/importvet
&& mv /go/bin/importvet /toolchain/go/bin/importvet
RUN --mount=type=cache,target=/.cache go install golang.org/x/vuln/cmd/govulncheck@latest \
&& mv /go/bin/govulncheck /toolchain/go/bin/govulncheck
RUN --mount=type=cache,target=/.cache go install github.com/uber/prototool/cmd/prototool@v1.10.0 \
ARG PROTOTOOL_VERSION
RUN --mount=type=cache,target=/.cache go install github.com/uber/prototool/cmd/prototool@${PROTOTOOL_VERSION} \
&& mv /go/bin/prototool /toolchain/go/bin/prototool
ARG PROTOC_GEN_DOC_VERSION
RUN --mount=type=cache,target=/.cache go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@${PROTOC_GEN_DOC_VERSION} \
&& mv /go/bin/protoc-gen-doc /toolchain/go/bin/protoc-gen-doc
COPY ./hack/docgen /go/src/github.com/siderolabs/talos-hack-docgen
RUN --mount=type=cache,target=/.cache cd /go/src/github.com/siderolabs/talos-hack-docgen \
&& go build -o docgen . \
Expand Down Expand Up @@ -1054,7 +1058,7 @@ RUN env HOME=/home/user TAG=latest /bin/talosctl docs --config /tmp/configuratio
&& env HOME=/home/user TAG=latest /bin/talosctl docs --cli /tmp
COPY ./pkg/machinery/config/schemas/*.schema.json /tmp/schemas/

FROM pseudomuto/protoc-gen-doc AS proto-docs-build
FROM tools AS proto-docs-build
COPY --from=generate-build /api /protos
COPY ./hack/protoc-gen-doc/markdown.tmpl /tmp/markdown.tmpl
RUN protoc \
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ VTPROTOBUF_VERSION ?= v0.6.0
DEEPCOPY_VERSION ?= v0.5.6
# renovate: datasource=go depName=github.com/siderolabs/importvet
IMPORTVET_VERSION ?= v0.2.0
# not setting renovate config since the repo is archived
PROTOTOOL_VERSION ?= v1.10.0
# renovate: datasource=go depName=github.com/pseudomuto/protoc-gen-doc
PROTOC_GEN_DOC_VERSION ?= v1.5.1
# renovate: datasource=npm depName=markdownlint-cli
MARKDOWNLINTCLI_VERSION ?= 0.40.0
# renovate: datasource=npm depName=textlint
Expand Down Expand Up @@ -161,6 +165,8 @@ COMMON_ARGS += --build-arg=ENUMER_VERSION=$(ENUMER_VERSION)
COMMON_ARGS += --build-arg=DEEPCOPY_GEN_VERSION=$(DEEPCOPY_GEN_VERSION)
COMMON_ARGS += --build-arg=VTPROTOBUF_VERSION=$(VTPROTOBUF_VERSION)
COMMON_ARGS += --build-arg=IMPORTVET_VERSION=$(IMPORTVET_VERSION)
COMMON_ARGS += --build-arg=PROTOTOOL_VERSION=$(PROTOTOOL_VERSION)
COMMON_ARGS += --build-arg=PROTOC_GEN_DOC_VERSION=$(PROTOC_GEN_DOC_VERSION)
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION=$(GOLANGCILINT_VERSION)
COMMON_ARGS += --build-arg=DEEPCOPY_VERSION=$(DEEPCOPY_VERSION)
COMMON_ARGS += --build-arg=MARKDOWNLINTCLI_VERSION=$(MARKDOWNLINTCLI_VERSION)
Expand Down

0 comments on commit fe52cb0

Please sign in to comment.