Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ RUN --mount=type=bind,target=. \
buf lint

FROM proto-base AS do-proto-generate
ARG CONNECT_GO_COMMIT
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=tmpfs,target=/go/src/ \
go install "connectrpc.com/connect/cmd/protoc-gen-connect-go@${CONNECT_GO_COMMIT}"
WORKDIR /src
RUN mkdir -p /generate/out
RUN --mount=type=bind,target=.,rw <<EOT
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ GO_VERSION := $(shell sh -c "awk '/^go / { print \$$2 }' go.work")

# For latest version, see: https://github.com/bufbuild/buf/tags
export BUF_VERSION := v1.56.0
# protoc-gen-connect-go, pinned by commit. Keep in step with connectrpc.com/connect in go.mod.
# v1.19.1: https://github.com/connectrpc/connect-go/releases/tag/v1.19.1
export CONNECT_GO_COMMIT := ad9598763248cc291416c2e956ecd50d128a19bf

ifeq ($(OS),Windows_NT)
WINDOWS = $(OS)
Expand All @@ -25,6 +28,7 @@ BUILDER=buildx-multiarch
DOCKER_BUILD_ARGS := --build-arg GO_VERSION \
--build-arg GOLANGCI_LINT_VERSION \
--build-arg BUF_VERSION \
--build-arg CONNECT_GO_COMMIT \
--build-arg GIT_TAG

GO_TEST := go test
Expand Down
3 changes: 2 additions & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ plugins:
opt:
- paths=source_relative
- default_api_level=API_OPAQUE
- remote: buf.build/connectrpc/go
# Installed in the Dockerfile, pinned by commit via CONNECT_GO_COMMIT in the Makefile.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: delete

- local: protoc-gen-connect-go
out: x/api
opt:
- paths=source_relative
Loading