Skip to content

Commit c0ac333

Browse files
Add grpc/swift-protobuf v2.1.2 (#2161)
Needed an update to the dependencies (related to #1941). For context, the steps were (from the plugin's directory): ``` $ git clone --depth 1 --branch 2.1.2 https://github.com/grpc/grpc-swift-protobuf --recursive $ cd grpc-swift-protobuf $ swift package resolve $ mv Package.resolved ../ ``` Probably a good reason to look to automate this now. Fixes #2160.
1 parent 069ccb8 commit c0ac333

File tree

6 files changed

+87
-0
lines changed

6 files changed

+87
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!Dockerfile
3+
!Package.resolved
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# syntax=docker/dockerfile:1.19
2+
FROM swift:6.2.3-bookworm AS build
3+
4+
RUN apt-get update \
5+
&& apt-get install -y unzip
6+
WORKDIR /app
7+
RUN git clone --depth 1 --branch 2.1.2 https://github.com/grpc/grpc-swift-protobuf --recursive
8+
WORKDIR /app/grpc-swift-protobuf
9+
COPY --link Package.resolved .
10+
RUN swift build -c release --static-swift-stdlib --product protoc-gen-grpc-swift-2 -Xlinker -s --force-resolved-versions
11+
12+
FROM gcr.io/distroless/cc-debian12:latest@sha256:0c8eac8ea42a167255d03c3ba6dfad2989c15427ed93d16c53ef9706ea4691df AS base
13+
14+
FROM scratch
15+
COPY --link --from=base / /
16+
COPY --link --from=build /app/grpc-swift-protobuf/.build/release/protoc-gen-grpc-swift-2 .
17+
USER nobody
18+
ENTRYPOINT [ "/protoc-gen-grpc-swift-2" ]

plugins/grpc/swift-protobuf/v2.1.2/Package.resolved

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: v1
2+
name: buf.build/grpc/swift-protobuf
3+
plugin_version: v2.1.2
4+
source_url: https://github.com/grpc/grpc-swift-protobuf
5+
integration_guide_url: https://swiftpackageindex.com/grpc/grpc-swift-protobuf/2.1.2/documentation/grpcprotobuf
6+
description: Generates Swift client and server stubs for the gRPC framework.
7+
deps:
8+
- plugin: buf.build/apple/swift:v1.33.3
9+
output_languages:
10+
- swift
11+
registry:
12+
swift:
13+
deps:
14+
- source: https://github.com/grpc/grpc-swift-protobuf.git
15+
package: grpc-swift-protobuf
16+
# https://github.com/grpc/grpc-swift-protobuf/blob/2.1.2/Package.swift#L22
17+
products: [ GRPCProtobuf ]
18+
version: 2.1.2
19+
# https://github.com/grpc/grpc-swift-protobuf/blob/2.1.2/Package.swift#L65
20+
swift_versions: [ ".v6" ]
21+
# https://github.com/grpc/grpc-swift-protobuf/blob/2.1.2/Package.swift#L58
22+
platforms:
23+
macos: v15
24+
ios: v18
25+
tvos: v18
26+
watchos: v11
27+
opts:
28+
- Visibility=Public
29+
- FileNaming=PathToUnderscores
30+
spdx_license_id: Apache-2.0
31+
license_url: https://github.com/grpc/grpc-swift-protobuf/blob/2.1.2/LICENSE
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:t5ycbVWI4y9Z5KuSJqQ4bQPdpHrWwVbMjESFbawChEE=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:icvJdhaYuOrR7ZCJZXU4y9CqvP1LJnJ+T7nvYk7SFuo=

0 commit comments

Comments
 (0)