Skip to content

Commit abb3362

Browse files
authored
Update grpc-ecosystem plugins to v2.24.0 (#1602)
Fix #1600
1 parent bd60f50 commit abb3362

File tree

12 files changed

+856
-0
lines changed

12 files changed

+856
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!Dockerfile
3+
!separate_pkg_additional_imports.patch
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# syntax=docker/dockerfile:1.10
2+
FROM --platform=$BUILDPLATFORM golang:1.23.3-bookworm AS build
3+
4+
ARG TARGETOS TARGETARCH
5+
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH
6+
7+
WORKDIR /tmp
8+
RUN git clone --depth 1 --branch v2.24.0 https://github.com/grpc-ecosystem/grpc-gateway.git
9+
COPY --link separate_pkg_additional_imports.patch /tmp/separate_pkg_additional_imports.patch
10+
WORKDIR /tmp/grpc-gateway
11+
RUN git apply /tmp/separate_pkg_additional_imports.patch
12+
WORKDIR /tmp/grpc-gateway/protoc-gen-grpc-gateway
13+
RUN --mount=type=cache,target=/go/pkg/mod \
14+
go install -ldflags="-s -w" -trimpath \
15+
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-gateway /go/bin/protoc-gen-grpc-gateway || true
16+
17+
FROM scratch
18+
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
19+
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-gateway /
20+
USER nobody
21+
ENTRYPOINT [ "/protoc-gen-grpc-gateway" ]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: v1
2+
name: buf.build/grpc-ecosystem/gateway
3+
plugin_version: v2.24.0
4+
source_url: https://github.com/grpc-ecosystem/grpc-gateway
5+
integration_guide_url: https://github.com/grpc-ecosystem/grpc-gateway#usage
6+
description: gRPC to JSON proxy generator following the gRPC HTTP spec.
7+
output_languages:
8+
- go
9+
registry:
10+
go:
11+
min_version: "1.22"
12+
deps:
13+
- module: github.com/grpc-ecosystem/grpc-gateway/v2
14+
version: v2.24.0
15+
opts:
16+
- paths=source_relative
17+
- standalone=true
18+
- separate_package=true
19+
deps:
20+
- plugin: buf.build/protocolbuffers/go:v1.35.2
21+
- plugin: buf.build/grpc/go:v1.5.1
22+
spdx_license_id: BSD-3-Clause
23+
license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.24.0/LICENSE.txt

0 commit comments

Comments
 (0)