diff --git a/plugins/grpc/swift-protobuf/v2.1.2/.dockerignore b/plugins/grpc/swift-protobuf/v2.1.2/.dockerignore new file mode 100644 index 000000000..2b3157b59 --- /dev/null +++ b/plugins/grpc/swift-protobuf/v2.1.2/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!Package.resolved diff --git a/plugins/grpc/swift-protobuf/v2.1.2/Dockerfile b/plugins/grpc/swift-protobuf/v2.1.2/Dockerfile new file mode 100644 index 000000000..c707f86d3 --- /dev/null +++ b/plugins/grpc/swift-protobuf/v2.1.2/Dockerfile @@ -0,0 +1,18 @@ +# syntax=docker/dockerfile:1.19 +FROM swift:6.2.3-bookworm AS build + +RUN apt-get update \ + && apt-get install -y unzip +WORKDIR /app +RUN git clone --depth 1 --branch 2.1.2 https://github.com/grpc/grpc-swift-protobuf --recursive +WORKDIR /app/grpc-swift-protobuf +COPY --link Package.resolved . +RUN swift build -c release --static-swift-stdlib --product protoc-gen-grpc-swift-2 -Xlinker -s --force-resolved-versions + +FROM gcr.io/distroless/cc-debian12:latest@sha256:0c8eac8ea42a167255d03c3ba6dfad2989c15427ed93d16c53ef9706ea4691df AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build /app/grpc-swift-protobuf/.build/release/protoc-gen-grpc-swift-2 . +USER nobody +ENTRYPOINT [ "/protoc-gen-grpc-swift-2" ] diff --git a/plugins/grpc/swift-protobuf/v2.1.2/Package.resolved b/plugins/grpc/swift-protobuf/v2.1.2/Package.resolved new file mode 100644 index 000000000..b5c98877f --- /dev/null +++ b/plugins/grpc/swift-protobuf/v2.1.2/Package.resolved @@ -0,0 +1,33 @@ +{ + "originHash" : "405f1b136bba244f838487f7511cabeb00efe492de4f30605c56321b8bb98bff", + "pins" : [ + { + "identity" : "grpc-swift-2", + "kind" : "remoteSourceControl", + "location" : "https://github.com/grpc/grpc-swift-2.git", + "state" : { + "revision" : "531924b28fde0cf7585123c781c6f55cc35ef7fc", + "version" : "2.2.1" + } + }, + { + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections.git", + "state" : { + "revision" : "7b847a3b7008b2dc2f47ca3110d8c782fb2e5c7e", + "version" : "1.3.0" + } + }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "c169a5744230951031770e27e475ff6eefe51f9d", + "version" : "1.33.3" + } + } + ], + "version" : 3 +} diff --git a/plugins/grpc/swift-protobuf/v2.1.2/buf.plugin.yaml b/plugins/grpc/swift-protobuf/v2.1.2/buf.plugin.yaml new file mode 100644 index 000000000..fa6ac88ea --- /dev/null +++ b/plugins/grpc/swift-protobuf/v2.1.2/buf.plugin.yaml @@ -0,0 +1,31 @@ +version: v1 +name: buf.build/grpc/swift-protobuf +plugin_version: v2.1.2 +source_url: https://github.com/grpc/grpc-swift-protobuf +integration_guide_url: https://swiftpackageindex.com/grpc/grpc-swift-protobuf/2.1.2/documentation/grpcprotobuf +description: Generates Swift client and server stubs for the gRPC framework. +deps: + - plugin: buf.build/apple/swift:v1.33.3 +output_languages: + - swift +registry: + swift: + deps: + - source: https://github.com/grpc/grpc-swift-protobuf.git + package: grpc-swift-protobuf + # https://github.com/grpc/grpc-swift-protobuf/blob/2.1.2/Package.swift#L22 + products: [ GRPCProtobuf ] + version: 2.1.2 + # https://github.com/grpc/grpc-swift-protobuf/blob/2.1.2/Package.swift#L65 + swift_versions: [ ".v6" ] + # https://github.com/grpc/grpc-swift-protobuf/blob/2.1.2/Package.swift#L58 + platforms: + macos: v15 + ios: v18 + tvos: v18 + watchos: v11 + opts: + - Visibility=Public + - FileNaming=PathToUnderscores +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc-swift-protobuf/blob/2.1.2/LICENSE diff --git a/tests/testdata/buf.build/grpc/swift-protobuf/v2.1.2/eliza/plugin.sum b/tests/testdata/buf.build/grpc/swift-protobuf/v2.1.2/eliza/plugin.sum new file mode 100644 index 000000000..104561e7d --- /dev/null +++ b/tests/testdata/buf.build/grpc/swift-protobuf/v2.1.2/eliza/plugin.sum @@ -0,0 +1 @@ +h1:t5ycbVWI4y9Z5KuSJqQ4bQPdpHrWwVbMjESFbawChEE= diff --git a/tests/testdata/buf.build/grpc/swift-protobuf/v2.1.2/petapis/plugin.sum b/tests/testdata/buf.build/grpc/swift-protobuf/v2.1.2/petapis/plugin.sum new file mode 100644 index 000000000..80263ca73 --- /dev/null +++ b/tests/testdata/buf.build/grpc/swift-protobuf/v2.1.2/petapis/plugin.sum @@ -0,0 +1 @@ +h1:icvJdhaYuOrR7ZCJZXU4y9CqvP1LJnJ+T7nvYk7SFuo=