Skip to content

Commit

Permalink
Update connect-swift to v1.0.0 (#1573)
Browse files Browse the repository at this point in the history
Update connectrpc/swift and connectrpc/swift-mocks to v1.0.0. Update
docker build to install the C++ development libraries which are now
needed for static linking to succeed.

Fixes #1572.
  • Loading branch information
pkwarren authored Nov 8, 2024
1 parent 946a698 commit f1fdfbd
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/connectrpc/swift-mocks/v1.0.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
17 changes: 17 additions & 0 deletions plugins/connectrpc/swift-mocks/v1.0.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# syntax=docker/dockerfile:1.10
FROM swift:5.10.1-bookworm AS build

WORKDIR /app
RUN apt-get update \
&& apt-get install -y libstdc++-12-dev
RUN git clone --depth 1 --branch 1.0.0 https://github.com/connectrpc/connect-swift
WORKDIR /app/connect-swift
RUN swift build -c release --product protoc-gen-connect-swift-mocks --static-swift-stdlib -Xlinker -s

FROM gcr.io/distroless/cc-debian12:latest@sha256:6f05aba4de16e89f8d879bf2a1364de3e41aba04f1dcbba8c75494f6134b4b13 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build /app/connect-swift/.build/release/protoc-gen-connect-swift-mocks .
USER nobody
ENTRYPOINT [ "/protoc-gen-connect-swift-mocks" ]
29 changes: 29 additions & 0 deletions plugins/connectrpc/swift-mocks/v1.0.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: v1
name: buf.build/connectrpc/swift-mocks
plugin_version: v1.0.0
source_url: https://github.com/connectrpc/connect-swift
integration_guide_url: https://connectrpc.com/docs/swift/testing
description: Generates mocks that are compatible with Connect-Swift clients.
deps:
- plugin: buf.build/apple/swift:v1.28.2
- plugin: buf.build/connectrpc/swift:v1.0.0
output_languages:
- swift
registry:
swift:
deps:
- source: https://github.com/connectrpc/connect-swift.git
package: connect-swift
products: [ ConnectMocks ]
swift_versions: [ ".v5" ]
version: 1.0.0
platforms:
macos: v10_15
ios: v12
tvos: v13
watchos: v6
opts:
- Visibility=Public
- FileNaming=PathToUnderscores
spdx_license_id: Apache-2.0
license_url: https://github.com/connectrpc/connect-swift/blob/1.0.0/LICENSE
2 changes: 2 additions & 0 deletions plugins/connectrpc/swift/v1.0.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
17 changes: 17 additions & 0 deletions plugins/connectrpc/swift/v1.0.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# syntax=docker/dockerfile:1.10
FROM swift:5.10.1-bookworm AS build

WORKDIR /app
RUN apt-get update \
&& apt-get install -y libstdc++-12-dev
RUN git clone --depth 1 --branch 1.0.0 https://github.com/connectrpc/connect-swift
WORKDIR /app/connect-swift
RUN swift build -c release --product protoc-gen-connect-swift --static-swift-stdlib -Xlinker -s

FROM gcr.io/distroless/cc-debian12:latest@sha256:6f05aba4de16e89f8d879bf2a1364de3e41aba04f1dcbba8c75494f6134b4b13 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build /app/connect-swift/.build/release/protoc-gen-connect-swift .
USER nobody
ENTRYPOINT [ "/protoc-gen-connect-swift" ]
28 changes: 28 additions & 0 deletions plugins/connectrpc/swift/v1.0.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: v1
name: buf.build/connectrpc/swift
plugin_version: v1.0.0
source_url: https://github.com/connectrpc/connect-swift
integration_guide_url: https://connectrpc.com/docs/swift/getting-started
description: Idiomatic gRPC & Connect RPCs for Swift.
deps:
- plugin: buf.build/apple/swift:v1.28.2
output_languages:
- swift
registry:
swift:
deps:
- source: https://github.com/connectrpc/connect-swift.git
package: connect-swift
products: [ Connect ]
swift_versions: [ ".v5" ]
version: 1.0.0
platforms:
macos: v10_15
ios: v12
tvos: v13
watchos: v6
opts:
- Visibility=Public
- FileNaming=PathToUnderscores
spdx_license_id: Apache-2.0
license_url: https://github.com/connectrpc/connect-swift/blob/1.0.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:dFV12zZWalkRO3BRSNMIP9cKQcrS87zoYVL+cNKJoPE=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:iwKLQczZMy7NJbuX4jpwzzp9IARStvmwh+m1o5Ve1Cc=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:o8bVd1VnuRX8uByCzYCgqxALYRwaCZ39sABqiB6S3A8=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:8zAlLcSJY9ilkZNjQmmpPj80LzrVr/zmPKHRpF3J9JE=

0 comments on commit f1fdfbd

Please sign in to comment.