Files
swift-aws-lambda-runtime/Examples/ServiceLifecycle+Postgres/Package.swift
T
Sébastien Stormacq ddad9b9bee Use published dependency by default in examples (#665)
## Summary

Examples now default to the published `swift-aws-lambda-runtime` package
from GitHub, so they work out of the box when cloned standalone (as
described in the READMEs).

CI scripts swap the dependency to the local path (`../..`) before
building, ensuring we still test against the current branch.

### Changes

- **`Examples/APIGatewayV2/Package.swift`** — Default to remote URL,
local path is commented out with clear instructions.
- **`.github/workflows/scripts/use-local-deps.sh`** (new) — Shared
script that rewrites Package.swift to use the local dependency.
- **`integration_tests.sh`**, **`check-archive-plugin.sh`**,
**`check-link-foundation.sh`** — Source `use-local-deps.sh` before
building.
2026-05-11 21:38:11 +02:00

33 lines
1.3 KiB
Swift

// swift-tools-version: 6.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "LambdaWithServiceLifecycle",
platforms: [
.macOS(.v15)
],
dependencies: [
// For local development, uncomment the line below and comment the remote dependency:
// .package(name: "swift-aws-lambda-runtime", path: "../.."),
.package(url: "https://github.com/awslabs/swift-aws-lambda-runtime.git", from: "2.9.0"),
.package(url: "https://github.com/awslabs/swift-aws-lambda-events.git", from: "1.4.0"),
.package(url: "https://github.com/vapor/postgres-nio.git", from: "1.30.0"),
.package(url: "https://github.com/swift-server/swift-service-lifecycle.git", from: "2.9.1"),
],
targets: [
.executableTarget(
name: "LambdaWithServiceLifecycle",
dependencies: [
.product(name: "PostgresNIO", package: "postgres-nio"),
.product(name: "ServiceLifecycle", package: "swift-service-lifecycle"),
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
.product(name: "AWSLambdaEvents", package: "swift-aws-lambda-events"),
]
)
]
)