Skip to content

Commit

Permalink
Add protocolbuffers/go v1.35.1 plugin (#1538)
Browse files Browse the repository at this point in the history
Needed to bump `min_version` to `1.21` after
protocolbuffers/protobuf-go@af06170.

Fixes #1537.
  • Loading branch information
stefanvanburen authored Oct 8, 2024
1 parent b1776ea commit a157d3a
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/protocolbuffers/go/v1.35.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
15 changes: 15 additions & 0 deletions plugins/protocolbuffers/go/v1.35.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# syntax=docker/dockerfile:1.10
FROM --platform=$BUILDPLATFORM golang:1.23.2-bookworm AS build

ARG TARGETOS TARGETARCH
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH

RUN --mount=type=cache,target=/go/pkg/mod \
go install -ldflags "-s -w" -trimpath google.golang.org/protobuf/cmd/protoc-gen-go@v1.35.1 \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-go /go/bin/protoc-gen-go || true

FROM scratch
COPY --from=build --link /etc/passwd /etc/passwd
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-go .
USER nobody
ENTRYPOINT [ "/protoc-gen-go" ]
19 changes: 19 additions & 0 deletions plugins/protocolbuffers/go/v1.35.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: v1
name: buf.build/protocolbuffers/go
plugin_version: v1.35.1
source_url: https://github.com/protocolbuffers/protobuf-go
integration_guide_url: https://protobuf.dev/getting-started/gotutorial
description: Base types for Go. Generates message and enum types.
output_languages:
- go
registry:
go:
# https://github.com/protocolbuffers/protobuf-go/blob/v1.35.1/go.mod#L3
min_version: "1.21"
deps:
- module: google.golang.org/protobuf
version: v1.35.1
opts:
- paths=source_relative
spdx_license_id: BSD-3-Clause
license_url: https://github.com/protocolbuffers/protobuf-go/blob/v1.35.1/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:FN0txPJBdKpjYcFFsRebhhGjDoDgVdd0MVIwsVr4ppo=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:JTte37cvxS+aetNDdWt9gw+MP4I8/l+2DVn2m1LLH7A=

0 comments on commit a157d3a

Please sign in to comment.