Files
tomer doron 3b72f6a6cf improve examples (#292)
motivation: examples can be confusing since they use relative path to the library for CI purposes

changes:
* update examples to use the library URL, expect when env variable is set for CI purposes
* rename docker compose job to test-examples since it is more accurate
2023-03-12 11:23:41 -07:00

38 lines
1.1 KiB
Swift

// swift-tools-version:5.7
import class Foundation.ProcessInfo // needed for CI to test the local version of the library
import PackageDescription
let package = Package(
name: "MyLambda",
platforms: [
.macOS(.v12),
],
products: [
.executable(name: "MyLambda", targets: ["MyLambda"]),
],
dependencies: [
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
.package(name: "Shared", path: "../Shared"),
],
targets: [
.executableTarget(
name: "MyLambda",
dependencies: [
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
.product(name: "Shared", package: "Shared"),
],
path: ".",
exclude: ["scripts/", "Dockerfile"]
),
]
)
// for CI to test the local version of the library
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
package.dependencies = [
.package(name: "swift-aws-lambda-runtime", path: "../../.."),
.package(name: "Shared", path: "../Shared"),
]
}